]> Git Repo - linux.git/commit
oom: remove unnecessary code and cleanup
authorDavid Rientjes <[email protected]>
Tue, 10 Aug 2010 00:18:57 +0000 (17:18 -0700)
committerLinus Torvalds <[email protected]>
Tue, 10 Aug 2010 03:44:57 +0000 (20:44 -0700)
commitb940fd703572f7f9e5f894c682c91c3cbd84c11e
treecbb1f23073373ba1c425762f38f6f0bf9decf278
parent8e4228e1edb922afa83366803a1e5b3fa8e987c2
oom: remove unnecessary code and cleanup

Remove the redundancy in __oom_kill_task() since:

 - init can never be passed to this function: it will never be PF_EXITING
   or selectable from select_bad_process(), and

 - it will never be passed a task from oom_kill_task() without an ->mm
   and we're unconcerned about detachment from exiting tasks, there's no
   reason to protect them against SIGKILL or access to memory reserves.

Also moves the kernel log message to a higher level since the verbosity is
not always emitted here; we need not print an error message if an exiting
task is given a longer timeslice.

__oom_kill_task() only has a single caller, so it can be merged into that
function at the same time.

Signed-off-by: David Rientjes <[email protected]>
Reviewed-by: KAMEZAWA Hiroyuki <[email protected]>
Cc: KAMEZAWA Hiroyuki <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/oom_kill.c
This page took 0.054307 seconds and 4 git commands to generate.