aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/oom_kill.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index 83fb72c108b7..f52e85c80e8d 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -172,10 +172,13 @@ unsigned int oom_badness(struct task_struct *p, struct mem_cgroup *mem,
172 172
173 /* 173 /*
174 * The baseline for the badness score is the proportion of RAM that each 174 * The baseline for the badness score is the proportion of RAM that each
175 * task's rss and swap space use. 175 * task's rss, pagetable and swap space use.
176 */ 176 */
177 points = (get_mm_rss(p->mm) + get_mm_counter(p->mm, MM_SWAPENTS)) * 1000 / 177 points = get_mm_rss(p->mm) + p->mm->nr_ptes;
178 totalpages; 178 points += get_mm_counter(p->mm, MM_SWAPENTS);
179
180 points *= 1000;
181 points /= totalpages;
179 task_unlock(p); 182 task_unlock(p);
180 183
181 /* 184 /*