diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2011-05-02 21:37:03 +0200 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2011-05-02 21:37:08 +0200 |
| commit | 3687a2c0d81b23d30db4384ca804a701fc686e16 (patch) | |
| tree | 8f0582f6939ef9f0f7079bbbcc4025e46ea19f79 /mm/oom_kill.c | |
| parent | b4d246b12410b53506c311e5e0b6abb71ead65c6 (diff) | |
| parent | c7bcecbe98fe29e87ac7d01c70c5998806e0989f (diff) | |
Merge branch 'linus' into timers/core
Reason: Pick up the hrtimer_clock_to_base_table fix from mainline
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'mm/oom_kill.c')
| -rw-r--r-- | mm/oom_kill.c | 9 |
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, /* * The baseline for the badness score is the proportion of RAM that each - * task's rss and swap space use. + * task's rss, pagetable and swap space use. */ - points = (get_mm_rss(p->mm) + get_mm_counter(p->mm, MM_SWAPENTS)) * 1000 / - totalpages; + points = get_mm_rss(p->mm) + p->mm->nr_ptes; + points += get_mm_counter(p->mm, MM_SWAPENTS); + + points *= 1000; + points /= totalpages; task_unlock(p); /* |
