Locking kdecore into memory

Lubos Lunak l.lunak at suse.cz
Fri Jan 19 13:51:19 GMT 2007

On Friday 19 January 2007 14:06, Richard Moore wrote:
> On 1/19/07, John Tapsell <johnflux at gmail.com> wrote:
> >  What if we lock the main kde libraries into memory (so they can't
> > swap out) when the user is running a kde desktop?  This would only be
> > about 20MB or so.

 Yes, sounds reasonable. We already have one hack related to poor Linux memory 
management in OOM conditions, so why not. In fact it'd make sense to extend 
this to also basic desktop components - e.g. if KWin is unresponsive then 
more or less the whole desktop is unresponsive.

> IIRC mlock is only available as root so we can't do that.

 (Is it really simpler to send a mail that's wrong than just skimming over the 
manpage?) Having a small setuid helper just locking all libraries in memory 
wouldn't be a big deal. And in fact even non-root apps can do that, up to the 
set ulimit, but it's set to quite low value, at least here. It'd be nice if 
it was higher, important apps then could just do mlockall() and that'd be it, 
but I'm not quite sure people setting these limits would share our point of 

 PS: I wonder, would this be Linux-only or does OOM suck also with other 

Lubos Lunak
KDE developer
SUSE LINUX, s.r.o.   e-mail: l.lunak at suse.cz , l.lunak at kde.org
Lihovarska 1060/12   tel: +420 284 028 972
190 00 Prague 9      fax: +420 284 028 951
Czech Republic       http//www.suse.cz

More information about the kde-core-devel mailing list