aboutsummaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorDavid Rientjes <rientjes@google.com>2012-03-21 16:33:46 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-21 17:54:55 -0700
commit2a1c9b1fc0a0ea2e30cdeb69062647c5c5ae661f (patch)
treea123d061a5d95984e0446a350189f4a310d06b53 /samples
parentce24d8a14207c2036df86d2bd3d14b4393eb51e3 (diff)
mm, oom: avoid looping when chosen thread detaches its mm
oom_kill_task() returns non-zero iff the chosen process does not have any threads with an attached ->mm. In such a case, it's better to just return to the page allocator and retry the allocation because memory could have been freed in the interim and the oom condition may no longer exist. It's unnecessary to loop in the oom killer and find another thread to kill. This allows both oom_kill_task() and oom_kill_process() to be converted to void functions. If the oom condition persists, the oom killer will be recalled. Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: David Rientjes <rientjes@google.com> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Acked-by: Michal Hocko <mhocko@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions