linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* kernel 2.5:  mlock broken?
@ 2003-08-08 21:32 Andreas Romeyke
  2003-08-08 21:49 ` Andrew Morton
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Romeyke @ 2003-08-08 21:32 UTC (permalink / raw)
  To: Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 912 bytes --]

Hi folks,

By testing 2.6.0-test2, I detected that the glibc-function mlock(),
provided by /sys/mlock.h seems to be a deadlock in some cases on 2.5

If you want to lock more memory than physical RAM could be freed, the
mlock() does not return with an errorcode as under 2.4.21 does.
The system hangs around. This problem was catched under x86 and s390
architecture by using Debian distribution (woody and unstable) and
others  with the well known memtest program written by Charles Cazabon
from   http://www.qcc.ca/~charlesc/software/memtester/ (ver. 2.93.1).

IMHO the problem is effected in kernel  mm/mlock.c, ev. in do_mlock(),
because glibc was not changed between different kernelversions. The
glibc version was 2.3.1-17

Hope it helps.

Bye Andreas

PS.:If you think this report is not related to this list, please contact
me per private email.
PPS.: If you need further information, contact me too.

-- 

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: kernel 2.5:  mlock broken?
  2003-08-08 21:32 kernel 2.5: mlock broken? Andreas Romeyke
@ 2003-08-08 21:49 ` Andrew Morton
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2003-08-08 21:49 UTC (permalink / raw)
  To: Andreas Romeyke; +Cc: linux-kernel

Andreas Romeyke <art1@it-netservice.de> wrote:
>
> Hi folks,
> 
> By testing 2.6.0-test2, I detected that the glibc-function mlock(),
> provided by /sys/mlock.h seems to be a deadlock in some cases on 2.5
> 
> If you want to lock more memory than physical RAM could be freed, the
> mlock() does not return with an errorcode as under 2.4.21 does.
> The system hangs around. This problem was catched under x86 and s390
> architecture by using Debian distribution (woody and unstable) and
> others  with the well known memtest program written by Charles Cazabon
> from   http://www.qcc.ca/~charlesc/software/memtester/ (ver. 2.93.1).
> 

2.4 kernels have a little check which prevents a single process from
mlocking more than half of physical memory.  So you need to run two
processes to kill a 2.4 box with mlock.

Some people want to be able to mlock more memory than that in a single
process, so the check was removed in 2.6.  It was pretty pointless.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-08-08 22:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-08 21:32 kernel 2.5: mlock broken? Andreas Romeyke
2003-08-08 21:49 ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).