1
0
Fork 0

mm: oom_kill: remove unnecessary locking in exit_oom_victim()

Disabling the OOM killer needs to exclude allocators from entering, not
existing victims from exiting.

Right now the only waiter is suspend code, which achieves quiescence by
disabling the OOM killer.  But later on we want to add waits that hold
the lock instead to stop new victims from showing up.

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Michal Hocko <mhocko@suse.cz>
Acked-by: David Rientjes <rientjes@google.com>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
hifive-unleashed-5.1
Johannes Weiner 2015-06-24 16:57:16 -07:00 committed by Linus Torvalds
parent c38f1025f2
commit da51b14adb
1 changed files with 0 additions and 2 deletions

View File

@ -437,10 +437,8 @@ void exit_oom_victim(void)
{
clear_thread_flag(TIF_MEMDIE);
down_read(&oom_sem);
if (!atomic_dec_return(&oom_victims))
wake_up_all(&oom_victims_wait);
up_read(&oom_sem);
}
/**