Re: [Patch] cpusets policy kill no swap

From: Andrew Morton
Date: Sun Mar 20 2005 - 02:01:47 EST


Paul Jackson <pj@xxxxxxx> wrote:
>
> This mechanisms differs from a general purpose out-of-memory
> killer in various ways, including:
>
> * An oom-killer tries to score the bad buy, to avoid shooting
> the innocent little task that just happened to ask for one
> page too many.
> * The policy_kill_no_swap hook kills the current requester.
> * It takes severe memory pressure to wake up an oom-killer.
> * The policy_kill_no_swap hook triggers on the slightest
> pressure that exceeds readily free memory.
> * The oom-killer can be useful on a general purpose system.
> * The policy_kill_no_swap hook is only useful for carefully
> tuned apps running on dedicated nodes on large systems.
>

There are a lot of reasons why we would wake kswapd apart from starting
swapout. Such as to reclaim clean pagecache or some dcache+icache.

> In short - simple enough, but quite specialized.

Way too specialised, I suspect. Is it not possible to have a little
userspace daemon which monitors the long-running applications's rss and
whacks it if the rss gets too large?

The patch you have simply kills the process when all the eligible zones
reach their upper watermark. Again, we can probably determine that state
from userspace right now. If not, it would be simple enough to add the
required info to /proc somewhere.

-
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/