mm,oom_reaper: reduce find_lock_task_mm() usage
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Sat, 10 Sep 2016 10:34:08 +0000 (20:34 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Sat, 10 Sep 2016 10:34:08 +0000 (20:34 +1000)
commit1ab17aa351cb838c78b6a7e0047b58a0ba801ba8
treebe0eabd9d7dbbad0e336cf5f7b29b3e59073a456
parent4314f30b05ac898b3458d5fde0dc180a55f6c26e
mm,oom_reaper: reduce find_lock_task_mm() usage

Patch series "fortify oom killer even more", v2.

This patch (of 9):

__oom_reap_task() can be simplified a bit if it receives a valid mm from
oom_reap_task() which also uses that mm when __oom_reap_task() failed.  We
can drop one find_lock_task_mm() call and also make the __oom_reap_task()
code flow easier to follow.  Moreover, this will make later patch in the
series easier to review.  Pinning mm's mm_count for longer time is not
really harmful because this will not pin much memory.

This patch doesn't introduce any functional change.

Link: http://lkml.kernel.org/r/1472119394-11342-2-git-send-email-mhocko@kernel.org
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Michal Hocko <mhocko@suse.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Vladimir Davydov <vdavydov@parallels.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/oom_kill.c
This page took 0.024147 seconds and 5 git commands to generate.