[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: mlock() issues
On Wed, Oct 20, 2010 at 10:55:46PM +0100, Sad Clouds wrote:
> On Wed, 20 Oct 2010 20:06:41 +0000 (UTC)
> mlelstv%serpens.de@localhost (Michael van Elst) wrote:
> > The soft rlimit and the UVM limit happen to be the same size,
> > which is one third of the real memory.
> > uvm_pdaemon.c:
> > uvmexp.wiredmax = uvmexp.npages / 3;
> > kern_proc.c:
> > lim = MIN(VM_MAXUSER_ADDRESS, ctob((rlim_t)uvmexp.free));
> > ...
> > limit0.pl_rlimit[RLIMIT_MEMLOCK].rlim_cur = lim / 3;
> OK, if I understand you correctly, there is hardcoded limit on how much
> memory can be locked, it is set to 1/3 of total memory and cannot be
> If that's the case, then why supplement soft and hard rlimit with UVM
The UVM limit is global to all processes, obviously there should
be such a limit to keep the system provided with unlocked pages.
You could probably make this configurable, but so far nobody had
the need to lock a large part of memory and to adjust that limit.
Michael van Elst
"A potential Snark may lurk in every tree."
Main Index |
Thread Index |