Re: [PATCH 14 of 16] oom select should only take rss into account

Andrea Arcangeli
2007-06-10T17:30:23Z

On Sun, Jun 10, 2007 at 01:17:13PM -0400, Rik van Riel wrote:
> Andrea Arcangeli wrote:
>
> >diff --git a/mm/oom_kill.c b/mm/oom_kill.c
> >--- a/mm/oom_kill.c
> >+++ b/mm/oom_kill.c
> >@@ -66,7 +66,7 @@ unsigned long badness(struct task_struct
> > /*
> > * The memory size of the process is the basis for the badness.
> > */
> >- points = mm->total_vm;
> >+ points = get_mm_rss(mm);
>
> Makes sense. Originally it used total_vm so it could also
> select tasks that use up lots of swap, but I guess that in
> almost all the cases the preferred OOM task to kill is also
> using a lot of RAM.

Agreed.

> Acked-by: Rik van Riel <riel@redhat.com>

Thanks for the Ack.