lkml.org 
[lkml]   [2003]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: kernel 2.5: mlock broken?
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.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:47    [W:0.027 / U:0.496 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site