diff options
author | Johannes Weiner <hannes@cmpxchg.org> | 2015-06-24 16:57:16 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-06-24 17:49:43 -0700 |
commit | da51b14adb671829077da3aeb9e9edd6f8c80afe (patch) | |
tree | 4c63aacddd164b79da44f78619d077189a2177a3 /mm/oom_kill.c | |
parent | c38f1025f2910d6183e9923d4b4d5804474b50c5 (diff) | |
download | linux-da51b14adb671829077da3aeb9e9edd6f8c80afe.tar.bz2 |
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>
Diffstat (limited to 'mm/oom_kill.c')
-rw-r--r-- | mm/oom_kill.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 472f124e5f08..d3490b019d46 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -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); } /** |