aboutsummaryrefslogtreecommitdiffstats
path: root/mm/oom_kill.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/oom_kill.c')
-rw-r--r--mm/oom_kill.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index 492c98624fc1..6bb8a7a7ec9a 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -352,6 +352,8 @@ static void dump_header(gfp_t gfp_mask, int order, struct mem_cgroup *mem)
352 dump_tasks(mem); 352 dump_tasks(mem);
353} 353}
354 354
355#define K(x) ((x) << (PAGE_SHIFT-10))
356
355/* 357/*
356 * Send SIGKILL to the selected process irrespective of CAP_SYS_RAW_IO 358 * Send SIGKILL to the selected process irrespective of CAP_SYS_RAW_IO
357 * flag though it's unlikely that we select a process with CAP_SYS_RAW_IO 359 * flag though it's unlikely that we select a process with CAP_SYS_RAW_IO
@@ -365,15 +367,23 @@ static void __oom_kill_task(struct task_struct *p, int verbose)
365 return; 367 return;
366 } 368 }
367 369
370 task_lock(p);
368 if (!p->mm) { 371 if (!p->mm) {
369 WARN_ON(1); 372 WARN_ON(1);
370 printk(KERN_WARNING "tried to kill an mm-less task!\n"); 373 printk(KERN_WARNING "tried to kill an mm-less task %d (%s)!\n",
374 task_pid_nr(p), p->comm);
375 task_unlock(p);
371 return; 376 return;
372 } 377 }
373 378
374 if (verbose) 379 if (verbose)
375 printk(KERN_ERR "Killed process %d (%s)\n", 380 printk(KERN_ERR "Killed process %d (%s) "
376 task_pid_nr(p), p->comm); 381 "vsz:%lukB, anon-rss:%lukB, file-rss:%lukB\n",
382 task_pid_nr(p), p->comm,
383 K(p->mm->total_vm),
384 K(get_mm_counter(p->mm, anon_rss)),
385 K(get_mm_counter(p->mm, file_rss)));
386 task_unlock(p);
377 387
378 /* 388 /*
379 * We give our sacrificial lamb high priority and access to 389 * We give our sacrificial lamb high priority and access to