Re: [patch 03/12] mm: oom_kill: switch test-and-clear of known TIF_MEMDIE to clear

2015-03-30 Thread Michal Hocko
On Thu 26-03-15 12:50:20, David Rientjes wrote: [...] > android, lmk: avoid setting TIF_MEMDIE if process has already exited > > TIF_MEMDIE should not be set on a process if it does not have a valid > ->mm, and this is protected by task_lock(). > > If TIF_MEMDIE gets set after the mm has detache

Re: [patch 03/12] mm: oom_kill: switch test-and-clear of known TIF_MEMDIE to clear

2015-03-26 Thread David Rientjes
On Thu, 26 Mar 2015, Johannes Weiner wrote: > > > exit_oom_victim() already knows that TIF_MEMDIE is set, and nobody > > > else can clear it concurrently. Use clear_thread_flag() directly. > > > > > > Signed-off-by: Johannes Weiner > > > > For the oom killer, that's true because of task_lock()

Re: [patch 03/12] mm: oom_kill: switch test-and-clear of known TIF_MEMDIE to clear

2015-03-26 Thread Michal Hocko
On Wed 25-03-15 02:17:07, Johannes Weiner wrote: > exit_oom_victim() already knows that TIF_MEMDIE is set, and nobody > else can clear it concurrently. Use clear_thread_flag() directly. Yeah. This is a left over from the review process. I originally did unmarking unconditionally but Tejun suggest

Re: [patch 03/12] mm: oom_kill: switch test-and-clear of known TIF_MEMDIE to clear

2015-03-26 Thread Johannes Weiner
Hi David, On Wed, Mar 25, 2015 at 08:31:49PM -0700, David Rientjes wrote: > On Wed, 25 Mar 2015, Johannes Weiner wrote: > > > exit_oom_victim() already knows that TIF_MEMDIE is set, and nobody > > else can clear it concurrently. Use clear_thread_flag() directly. > > > > Signed-off-by: Johannes

Re: [patch 03/12] mm: oom_kill: switch test-and-clear of known TIF_MEMDIE to clear

2015-03-25 Thread David Rientjes
On Wed, 25 Mar 2015, Johannes Weiner wrote: > exit_oom_victim() already knows that TIF_MEMDIE is set, and nobody > else can clear it concurrently. Use clear_thread_flag() directly. > > Signed-off-by: Johannes Weiner For the oom killer, that's true because of task_lock(): we always only set TI

[patch 03/12] mm: oom_kill: switch test-and-clear of known TIF_MEMDIE to clear

2015-03-24 Thread Johannes Weiner
exit_oom_victim() already knows that TIF_MEMDIE is set, and nobody else can clear it concurrently. Use clear_thread_flag() directly. Signed-off-by: Johannes Weiner --- mm/oom_kill.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/oom_kill.c b/mm/oom_kill.c index b2f081f