lkml.org 
[lkml]   [1997]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectLinux 2.1.X virtual memory odities
Hi, kernel hackers.

And vm hackers please listen.

[System is 486DX with 20meg of ram and enough swap space]
~~~~~~~~~~~~~~~~~

Linux is expected to keep nr_free_pages > reserved_pages. Right? So,
if system is idle, and you wait some time and then ask for atomic
memory, you'll get some. Right?

NO!

Tested under 2.1.46, I patched sysrq.c to alloc all available memory
using kmalloc with GFP_ATOMIC in 3K chunks... [BTW kmalloc(1) seems to
do strange things under 2.1.47].

From 2.1.47

........................(13164K)
SysRq: Eating pages ............................(112K)
SysRq: Eating pages ....(16K)
SysRq: Eating pages (0K)
SysRq: Eating pages (0K)
[10 sec passed]
bash: [10: command not found
pavel@Elf:~$ SysRq: Eating pages (0K)

System was idle all the time. Looks to me like there's something
seriously broken in there... There was enough swap, so that memory
_should_ get freed. 100% reproducible in here...

Pavel

Quote from sysrq.c:

case 'w': /* W -- eat physical memory */
{
int i = 0;
void **c= eaten_memory, *m;
printk( "Eating pages " );
while ((m = kmalloc( 3500, GFP_ATOMIC )))
{
eaten_memory = m;
printk( "." );
*eaten_memory = c;
c = eaten_memory;
i++;
}
printk( "(%dK)\n", i*4 );
}
break;


--
I'm really pavel@atrey.karlin.mff.cuni.cz. Pavel
Look at http://atrey.karlin.mff.cuni.cz/~pavel/ ;-).

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