Re: [RFC][PATCH] oom_kill: avoid depends on total_vm and use realRSS/swap value for oom_score (Re: Memory overcommit

From: KAMEZAWA Hiroyuki
Date: Tue Oct 27 2009 - 20:35:03 EST


On Tue, 27 Oct 2009 19:47:43 +0100
Andrea Arcangeli <aarcange@xxxxxxxxxx> wrote:
> > should be included along with rss isn't quite clear to me: I'm not
> > saying you're wrong, not at all, just that it's not quite obvious.
>
> Agreed it's not obvious. Intuitively I think only including RSS and no
> swap is best, but clearly I can't be entirely against including swap
> too as there may be scenarios where including swap provides for a
> better choice.
>
> My argument for not including swap is that we kill tasks to free RAM
> (we don't really care to free swap, system needs RAM at oom time).
> Freeing swap won't immediately help because no RAM is freed when swap
> is released (sure other tasks that sits huge in RAM can be moved to
> swap after swap isn't full but if we immediately killed those tasks
> that were huge in RAM in the first place we'd be better off).
>
Okay.

As first step, I'll divide this into
- replace total_vm with anon_rss/file_rss patch
- swap accounting
- a patch for consider whether swap amount should be included or not.

Then, necessary part will go early. And backport will be easy.

Thanks,
-Kame


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/