Re: [patch] swapin rlimit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2005-11-04 at 11:21 +0100, Ingo Molnar wrote:
> * Bernd Petrovitsch <[email protected]> wrote:
> > On Fri, 2005-11-04 at 08:26 +0100, Ingo Molnar wrote:
> > > * Andrew Morton <[email protected]> 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 
                                                in memory.
> task (and thus frees all the RAM it had) when it touches swap for the 
> first time. These two solutions almost oppose each other!

Almost IMHO as locked pages in RAM avoid swapping totally. Probably
"complement each other" is more correct.

Given the limit for "max locked memory" it should pretty much behave the
same if the process gets on his limits.
OK, the difference may be loaded executable and lib pages.

Hmm, delivering a signal on the first swapped out page might be another
simple solution and the process might do something to avoid it.

The nice thing about "swap ulimit" is: It is easy to understand what it
is (which is always a good thing).
Generating a similar effect with the combination of 2 other features is
probably somewhat more arcane.

	Bernd
-- 
Firmix Software GmbH                   http://www.firmix.at/
mobil: +43 664 4416156                 fax: +43 1 7890849-55
          Embedded Linux Development and Services

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux