Re: [patch] swapin rlimit

From: Ingo Molnar
Date: Fri Nov 04 2005 - 05:21:49 EST



* Bernd Petrovitsch <bernd@xxxxxxxxx> wrote:

> On Fri, 2005-11-04 at 08:26 +0100, Ingo Molnar wrote:
> > * Andrew Morton <akpm@xxxxxxxx> wrote:
> >
> > > Similarly, that SGI patch which was rejected 6-12 months ago to kill
> > > off processes once they started swapping. We thought that it could be
> > > done from userspace, but we need a way for userspace to detect when a
> > > task is being swapped on a per-task basis.
> >
> > wouldnt the clean solution here be a "swap ulimit"?
>
> Hmm, where is the difference to "mlockall(MCL_CURRENT|MCL_FUTURE);"?
> OK, mlockall() can only be done by root (processes).

what do you mean? mlockall pins down all pages. swapin ulimit kills the
task (and thus frees all the RAM it had) when it touches swap for the
first time. These two solutions almost oppose each other!

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