Subject: Re: lazy mlock?
To: Wojciech Puchar <wojtek@chylonia.3miasto.net>
From: Richard Earnshaw <rearnsha@buzzard.freeserve.co.uk>
List: tech-kern
Date: 04/18/2002 21:19:51
> > Hey, Woj.
> >
> > I think you can't be possibly farther from the mark.  It's the kernel's
> > responsibility to limit the abuse from the programmer, because
> > programmers are either too smart or too stupid for the system's purpose.
> 
> ulimit can limit locked memory.

Yes, but it limits the locking in the wrong way.  Instead of locking the 
pages that are useful, it locks as many pages (linearly) as it can until 
the threshold is reached.  After that, nothing gets locked, even if it is 
more deserving.

It's a brute-force limit, not an intelligent one.

R.