2004-03-30 17:00:55

by Eli Cohen

[permalink] [raw]
Subject: how to avoid low memory situation

Hi,
Our driver is locking user space memory by calling sys_mlock() while the
processes are ordinary processes without root priviliges. However it
happens that the system has low memory since there have been many
processes that locked memory and another attempt to lock memory brings
the system to a state in which it struggles to find some free pages and
the system becomes none responsive. Checking just the amount of free
pages just before attempting to lock is not so good since there may be a
lot of pages used by various caches which could be reduced thus allowing
to lock memory. I am seeking a method in which I can forsee if another
attempt to lock memory will bring me to such a condition and thus avoid it.

thanks for any help
Eli


2004-03-30 17:17:21

by Arjan van de Ven

[permalink] [raw]
Subject: Re: how to avoid low memory situation

On Tue, 2004-03-30 at 19:01, Eli Cohen wrote:
> Hi,
> Our driver is locking user space memory by calling sys_mlock() while the
> processes are ordinary processes without root priviliges.

ewwwwwwwwwwwwwwwwwwwwwww


Attachments:
signature.asc (189.00 B)
This is a digitally signed message part