[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110315191256.GB21640@redhat.com>
Date: Tue, 15 Mar 2011 20:12:56 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: David Rientjes <rientjes@...gle.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Hugh Dickins <hughd@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
Andrey Vagin <avagin@...nvz.org>,
Frantisek Hrbata <fhrbata@...hat.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3 for 2.6.38] oom: oom_kill_process: don't set
TIF_MEMDIE if !p->mm
On 03/14, David Rientjes wrote:
>
> On Mon, 14 Mar 2011, Linus Torvalds wrote:
>
> > The combination of testing PF_EXITING and p->mm just doesn't seem to
> > make any sense.
> >
>
> Right, it doesn't (and I recently removed testing the combination from
> select_bad_process() in -mm). The check for PF_EXITING in the oom killer
> is purely to avoid needlessly killing tasks when something is already
> exiting
Maybe 0/3 wasn't clear enough. This patches does not try to fix things,
it only tries to close the hole in 2.6.38. But it was already released
today.
> and will (hopefully) be freeing its memory soon.
This is not clear to me.
When I did this change I looked at 81236810226f71bd9ff77321c8e8276dae7efc61
and the changelog says:
__oom_kill_task() is called to elevate the task's timeslice and give it
access to memory reserves so that it may quickly exit.
This privilege is unnecessary, however, if the task has already detached
its mm.
Now you are saing this is pointless.
OK. I already said I do not understand this special case. Perhaps I'll ask
the questions later.
> If an eligible
> thread is found to be PF_EXITING,
The problem is, we can't trust per-thread PF_EXITING checks. But I guess
we will discuss this more anyway.
Oleg.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists