aboutsummaryrefslogtreecommitdiffstats
path: root/mm/oom_kill.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2009-06-11 04:58:01 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2009-06-11 04:58:01 -0400
commit4894e4aca82aca927d0404ce61f021f790de4b1e (patch)
treebbe0d083829f5858295298f188d885367cf4b1f6 /mm/oom_kill.c
parent05e882f890038c702a4f15d385135d03cf74ad48 (diff)
parent07a2039b8eb0af4ff464efd3dfd95de5c02648c6 (diff)
Merge commit 'v2.6.30' into next
Diffstat (limited to 'mm/oom_kill.c')
-rw-r--r--mm/oom_kill.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index 92bcf1db16b2..a7b2460e922b 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -284,22 +284,28 @@ static void dump_tasks(const struct mem_cgroup *mem)
284 printk(KERN_INFO "[ pid ] uid tgid total_vm rss cpu oom_adj " 284 printk(KERN_INFO "[ pid ] uid tgid total_vm rss cpu oom_adj "
285 "name\n"); 285 "name\n");
286 do_each_thread(g, p) { 286 do_each_thread(g, p) {
287 /* 287 struct mm_struct *mm;
288 * total_vm and rss sizes do not exist for tasks with a 288
289 * detached mm so there's no need to report them.
290 */
291 if (!p->mm)
292 continue;
293 if (mem && !task_in_mem_cgroup(p, mem)) 289 if (mem && !task_in_mem_cgroup(p, mem))
294 continue; 290 continue;
295 if (!thread_group_leader(p)) 291 if (!thread_group_leader(p))
296 continue; 292 continue;
297 293
298 task_lock(p); 294 task_lock(p);
295 mm = p->mm;
296 if (!mm) {
297 /*
298 * total_vm and rss sizes do not exist for tasks with no
299 * mm so there's no need to report them; they can't be
300 * oom killed anyway.
301 */
302 task_unlock(p);
303 continue;
304 }
299 printk(KERN_INFO "[%5d] %5d %5d %8lu %8lu %3d %3d %s\n", 305 printk(KERN_INFO "[%5d] %5d %5d %8lu %8lu %3d %3d %s\n",
300 p->pid, __task_cred(p)->uid, p->tgid, 306 p->pid, __task_cred(p)->uid, p->tgid, mm->total_vm,
301 p->mm->total_vm, get_mm_rss(p->mm), (int)task_cpu(p), 307 get_mm_rss(mm), (int)task_cpu(p), p->oomkilladj,
302 p->oomkilladj, p->comm); 308 p->comm);
303 task_unlock(p); 309 task_unlock(p);
304 } while_each_thread(g, p); 310 } while_each_thread(g, p);
305} 311}