diff options
-rw-r--r-- | Documentation/sysctl/vm.txt | 7 | ||||
-rw-r--r-- | mm/oom_kill.c | 11 |
2 files changed, 10 insertions, 8 deletions
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt index 06d662b1c5d5..dcc2a94ae34e 100644 --- a/Documentation/sysctl/vm.txt +++ b/Documentation/sysctl/vm.txt | |||
@@ -491,9 +491,10 @@ oom_dump_tasks | |||
491 | 491 | ||
492 | Enables a system-wide task dump (excluding kernel threads) to be | 492 | Enables a system-wide task dump (excluding kernel threads) to be |
493 | produced when the kernel performs an OOM-killing and includes such | 493 | produced when the kernel performs an OOM-killing and includes such |
494 | information as pid, uid, tgid, vm size, rss, cpu, oom_adj score, and | 494 | information as pid, uid, tgid, vm size, rss, nr_ptes, swapents, |
495 | name. This is helpful to determine why the OOM killer was invoked | 495 | oom_score_adj score, and name. This is helpful to determine why the |
496 | and to identify the rogue task that caused it. | 496 | OOM killer was invoked, to identify the rogue task that caused it, |
497 | and to determine why the OOM killer chose the task it did to kill. | ||
497 | 498 | ||
498 | If this is set to zero, this information is suppressed. On very | 499 | If this is set to zero, this information is suppressed. On very |
499 | large systems with thousands of tasks it may not be feasible to dump | 500 | large systems with thousands of tasks it may not be feasible to dump |
diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 50e74373e855..c82ede69bf3f 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c | |||
@@ -371,8 +371,8 @@ static struct task_struct *select_bad_process(unsigned int *ppoints, | |||
371 | * Dumps the current memory state of all eligible tasks. Tasks not in the same | 371 | * Dumps the current memory state of all eligible tasks. Tasks not in the same |
372 | * memcg, not in the same cpuset, or bound to a disjoint set of mempolicy nodes | 372 | * memcg, not in the same cpuset, or bound to a disjoint set of mempolicy nodes |
373 | * are not shown. | 373 | * are not shown. |
374 | * State information includes task's pid, uid, tgid, vm size, rss, cpu, oom_adj | 374 | * State information includes task's pid, uid, tgid, vm size, rss, nr_ptes, |
375 | * value, oom_score_adj value, and name. | 375 | * swapents, oom_score_adj value, and name. |
376 | * | 376 | * |
377 | * Call with tasklist_lock read-locked. | 377 | * Call with tasklist_lock read-locked. |
378 | */ | 378 | */ |
@@ -381,7 +381,7 @@ static void dump_tasks(const struct mem_cgroup *memcg, const nodemask_t *nodemas | |||
381 | struct task_struct *p; | 381 | struct task_struct *p; |
382 | struct task_struct *task; | 382 | struct task_struct *task; |
383 | 383 | ||
384 | pr_info("[ pid ] uid tgid total_vm rss cpu oom_adj oom_score_adj name\n"); | 384 | pr_info("[ pid ] uid tgid total_vm rss nr_ptes swapents oom_score_adj name\n"); |
385 | for_each_process(p) { | 385 | for_each_process(p) { |
386 | if (oom_unkillable_task(p, memcg, nodemask)) | 386 | if (oom_unkillable_task(p, memcg, nodemask)) |
387 | continue; | 387 | continue; |
@@ -396,10 +396,11 @@ static void dump_tasks(const struct mem_cgroup *memcg, const nodemask_t *nodemas | |||
396 | continue; | 396 | continue; |
397 | } | 397 | } |
398 | 398 | ||
399 | pr_info("[%5d] %5d %5d %8lu %8lu %3u %3d %5d %s\n", | 399 | pr_info("[%5d] %5d %5d %8lu %8lu %7lu %8lu %5d %s\n", |
400 | task->pid, from_kuid(&init_user_ns, task_uid(task)), | 400 | task->pid, from_kuid(&init_user_ns, task_uid(task)), |
401 | task->tgid, task->mm->total_vm, get_mm_rss(task->mm), | 401 | task->tgid, task->mm->total_vm, get_mm_rss(task->mm), |
402 | task_cpu(task), task->signal->oom_adj, | 402 | task->mm->nr_ptes, |
403 | get_mm_counter(task->mm, MM_SWAPENTS), | ||
403 | task->signal->oom_score_adj, task->comm); | 404 | task->signal->oom_score_adj, task->comm); |
404 | task_unlock(task); | 405 | task_unlock(task); |
405 | } | 406 | } |