From: Chris Down <chris@chrisdown.name>
To: Matthew Wilcox <willy@infradead.org>
Cc: Vlastimil Babka <vbabka@suse.cz>,
zangchunxin@bytedance.com, akpm@linux-foundation.org,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Muchun Song <songmuchun@bytedance.com>
Subject: Re: [PATCH v2] mm/vmscan: fix infinite loop in drop_slab_node
Date: Wed, 9 Sep 2020 22:56:16 +0100 [thread overview]
Message-ID: <20200909215616.GA1609213@chrisdown.name> (raw)
In-Reply-To: <20200909215209.GP6583@casper.infradead.org>
Matthew Wilcox writes:
>On Wed, Sep 09, 2020 at 10:47:24PM +0100, Chris Down wrote:
>> Vlastimil Babka writes:
>> > - Exit also on other signals such as SIGABRT, SIGTERM? If I write to drop_caches
>> > and think it's too long, I would prefer to kill it by ctrl-c and not just kill
>>
>> Oh dear, fatal_signal_pending() doesn't consider cases with no more
>> userspace instructions due to SIG_DFL on TERM/INT etc, that seems misleading
>> :-( I had (naively) believed it internally checks the same set as
>> TASK_KILLABLE.
>>
>> Chuxin, Muchun, can you please make it work using TASK_KILLABLE in a similar
>> way to how schedule_timeout_killable and friends do it instead, so that
>> other signals will be caught?
>
>You're mistaken.
>
> if (sig_fatal(p, sig) &&
> !(signal->flags & SIGNAL_GROUP_EXIT) &&
> !sigismember(&t->real_blocked, sig) &&
> (sig == SIGKILL || !p->ptrace)) {
>...
> sigaddset(&t->pending.signal, SIGKILL);
>
>static inline int __fatal_signal_pending(struct task_struct *p)
>{
> return unlikely(sigismember(&p->pending.signal, SIGKILL));
>}
Oh great, that makes things way easier. Thanks!
next prev parent reply other threads:[~2020-09-09 21:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-09 15:20 zangchunxin
2020-09-09 16:09 ` Chris Down
2020-09-09 17:59 ` Vlastimil Babka
2020-09-09 21:47 ` Chris Down
2020-09-09 21:52 ` Matthew Wilcox
2020-09-09 21:56 ` Chris Down [this message]
2020-09-09 22:13 ` Vlastimil Babka
2020-09-09 21:49 ` Matthew Wilcox
2020-09-14 9:30 ` Michal Hocko
2020-09-14 13:25 ` [External] " Chunxin Zang
2020-09-14 13:47 ` Michal Hocko
2020-09-14 15:02 ` Chunxin Zang
2020-09-14 15:17 ` Michal Hocko
2020-09-15 4:23 ` Chunxin Zang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200909215616.GA1609213@chrisdown.name \
--to=chris@chrisdown.name \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=songmuchun@bytedance.com \
--cc=vbabka@suse.cz \
--cc=willy@infradead.org \
--cc=zangchunxin@bytedance.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox