diff options
author | David Rientjes <rientjes@google.com> | 2010-08-09 20:18:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-09 23:44:56 -0400 |
commit | 74ab7f1d3f22ccb02f8b14f1f2375416b1ab0adb (patch) | |
tree | 94f7e6b0e77fe11f200941f97d1fc895dc950fde /mm/oom_kill.c | |
parent | c55db95788a2a55a77f5a3ced1e59578710440b2 (diff) |
oom: improve commentary in dump_tasks()
The comments in dump_tasks() should be updated to be more clear about why
tasks are filtered and how they are filtered by its argument.
An unnecessary comment concerning a check for is_global_init() is removed
since it isn't of importance.
Suggested-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Rientjes <rientjes@google.com>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: Oleg Nesterov <oleg@redhat.com>
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 | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 5285da9a9c1a..ef4ed4ae6f64 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c | |||
@@ -323,7 +323,7 @@ static struct task_struct *select_bad_process(unsigned long *ppoints, | |||
323 | 323 | ||
324 | /** | 324 | /** |
325 | * dump_tasks - dump current memory state of all system tasks | 325 | * dump_tasks - dump current memory state of all system tasks |
326 | * @mem: target memory controller | 326 | * @mem: current's memory controller, if constrained |
327 | * | 327 | * |
328 | * Dumps the current memory state of all system tasks, excluding kernel threads. | 328 | * Dumps the current memory state of all system tasks, excluding kernel threads. |
329 | * State information includes task's pid, uid, tgid, vm size, rss, cpu, oom_adj | 329 | * State information includes task's pid, uid, tgid, vm size, rss, cpu, oom_adj |
@@ -342,11 +342,6 @@ static void dump_tasks(const struct mem_cgroup *mem) | |||
342 | printk(KERN_INFO "[ pid ] uid tgid total_vm rss cpu oom_adj " | 342 | printk(KERN_INFO "[ pid ] uid tgid total_vm rss cpu oom_adj " |
343 | "name\n"); | 343 | "name\n"); |
344 | for_each_process(p) { | 344 | for_each_process(p) { |
345 | /* | ||
346 | * We don't have is_global_init() check here, because the old | ||
347 | * code do that. printing init process is not big matter. But | ||
348 | * we don't hope to make unnecessary compatibility breaking. | ||
349 | */ | ||
350 | if (p->flags & PF_KTHREAD) | 345 | if (p->flags & PF_KTHREAD) |
351 | continue; | 346 | continue; |
352 | if (mem && !task_in_mem_cgroup(p, mem)) | 347 | if (mem && !task_in_mem_cgroup(p, mem)) |
@@ -355,8 +350,8 @@ static void dump_tasks(const struct mem_cgroup *mem) | |||
355 | task = find_lock_task_mm(p); | 350 | task = find_lock_task_mm(p); |
356 | if (!task) { | 351 | if (!task) { |
357 | /* | 352 | /* |
358 | * Probably oom vs task-exiting race was happen and ->mm | 353 | * This is a kthread or all of p's threads have already |
359 | * have been detached. thus there's no need to report | 354 | * detached their mm's. There's no need to report |
360 | * them; they can't be oom killed anyway. | 355 | * them; they can't be oom killed anyway. |
361 | */ | 356 | */ |
362 | continue; | 357 | continue; |