mm/oom_kill.c: fix task_will_free_mem() comment

Attempt to demystify the task_will_free_mem() loop.

Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Michal Hocko 2016-10-07 16:57:32 -07:00 committed by Linus Torvalds
parent 58fa2a5512
commit 5870c2e1d7

View File

@ -803,8 +803,9 @@ static bool task_will_free_mem(struct task_struct *task)
return true;
/*
* This is really pessimistic but we do not have any reliable way
* to check that external processes share with our mm
* Make sure that all tasks which share the mm with the given tasks
* are dying as well to make sure that a) nobody pins its mm and
* b) the task is also reapable by the oom reaper.
*/
rcu_read_lock();
for_each_process(p) {