|
@@ -169,8 +169,8 @@ unsigned long oom_badness(struct task_struct *p, struct mem_cgroup *memcg,
|
|
|
* The baseline for the badness score is the proportion of RAM that each
|
|
|
* task's rss, pagetable and swap space use.
|
|
|
*/
|
|
|
- points = get_mm_rss(p->mm) + atomic_long_read(&p->mm->nr_ptes) +
|
|
|
- get_mm_counter(p->mm, MM_SWAPENTS);
|
|
|
+ points = get_mm_rss(p->mm) + get_mm_counter(p->mm, MM_SWAPENTS) +
|
|
|
+ atomic_long_read(&p->mm->nr_ptes) + mm_nr_pmds(p->mm);
|
|
|
task_unlock(p);
|
|
|
|
|
|
/*
|
|
@@ -351,7 +351,7 @@ static void dump_tasks(struct mem_cgroup *memcg, const nodemask_t *nodemask)
|
|
|
struct task_struct *p;
|
|
|
struct task_struct *task;
|
|
|
|
|
|
- pr_info("[ pid ] uid tgid total_vm rss nr_ptes swapents oom_score_adj name\n");
|
|
|
+ pr_info("[ pid ] uid tgid total_vm rss nr_ptes nr_pmds swapents oom_score_adj name\n");
|
|
|
rcu_read_lock();
|
|
|
for_each_process(p) {
|
|
|
if (oom_unkillable_task(p, memcg, nodemask))
|
|
@@ -367,10 +367,11 @@ static void dump_tasks(struct mem_cgroup *memcg, const nodemask_t *nodemask)
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
- pr_info("[%5d] %5d %5d %8lu %8lu %7ld %8lu %5hd %s\n",
|
|
|
+ pr_info("[%5d] %5d %5d %8lu %8lu %7ld %7ld %8lu %5hd %s\n",
|
|
|
task->pid, from_kuid(&init_user_ns, task_uid(task)),
|
|
|
task->tgid, task->mm->total_vm, get_mm_rss(task->mm),
|
|
|
atomic_long_read(&task->mm->nr_ptes),
|
|
|
+ mm_nr_pmds(task->mm),
|
|
|
get_mm_counter(task->mm, MM_SWAPENTS),
|
|
|
task->signal->oom_score_adj, task->comm);
|
|
|
task_unlock(task);
|