From: Andrew Morton <akpm@linux-foundation.org>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Michal Hocko <mhocko@suse.cz>, dserrg <dserrg@gmail.com>,
linux-mm@kvack.org, David Rientjes <rientjes@google.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Sha Zhengju <handai.szj@taobao.com>
Subject: Re: [PATCH] oom: add pending SIGKILL check for chosen victim
Date: Wed, 24 Apr 2013 12:33:11 -0700 [thread overview]
Message-ID: <20130424123311.79614649c6a7951d9f8a39fe@linux-foundation.org> (raw)
In-Reply-To: <20130424154216.GA27929@redhat.com>
On Wed, 24 Apr 2013 17:42:16 +0200 Oleg Nesterov <oleg@redhat.com> wrote:
> On 04/24, Michal Hocko wrote:
> >
> > On Wed 24-04-13 16:55:14, Oleg Nesterov wrote:
> > >
> > > But I can't understand how this patch can fix the problem, I think it
> > > can't.
> > >
> > > From the changelog:
> > >
> > > When SIGKILL is sent to a task, it's also sent to all tasks in the same
> > > threadgroup. This information can be used to prevent triggering further
> > > oom killers for this threadgroup and avoid the infinite loop.
> > > ^^^^^^^^^^^^^^^^^^^^^^^
> > >
> > > How??
> >
> > I guess it assumes that fatal_signal_pending() is still true even when
> > the process is unhashed already.
>
> No, it is not (in general). The task can dequeue this SIGKIL and then
> exit. But this doesn't matter.
>
> > Which sounds like a workaround to me.
>
> The task can do everything after we check PF_EXITING or whatever else.
> Just suppose it is alive and running, but before we take tasklist_lock
> it exits and removes itself from list.
>
> But wait, I forgot that "p" is not necessarily the main thread, so
> the patch I sent is not enough...
>
> Oh, and this reminds me again but we can race with exec... but this
> is mostly theoretical. should be fixed anyway.
>
> I'll try to think more tomorrow. I need to recall the previous discussion
> at least.
Where does this leave us with Sergey's patch? "Still good, but
requires new changelog"?
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2013-04-24 19:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-22 15:06 Sergey Dyasly
2013-04-22 19:51 ` Michal Hocko
2013-04-23 15:26 ` dserrg
2013-04-23 15:56 ` Michal Hocko
2013-04-24 14:55 ` Oleg Nesterov
2013-04-24 15:22 ` Michal Hocko
2013-04-24 15:42 ` Oleg Nesterov
2013-04-24 19:33 ` Andrew Morton [this message]
2013-04-25 14:49 ` Oleg Nesterov
2013-04-25 15:41 ` Sergey Dyasly
2013-04-25 16:22 ` Oleg Nesterov
2013-05-02 17:20 ` Oleg Nesterov
2013-05-27 15:49 ` Sergey Dyasly
2013-05-27 16:16 ` Oleg Nesterov
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=20130424123311.79614649c6a7951d9f8a39fe@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=dserrg@gmail.com \
--cc=handai.szj@taobao.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.cz \
--cc=oleg@redhat.com \
--cc=rientjes@google.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