RAMDISK Bug - 2.0.36 kernel (again)

Bill Melotti (billy@cognito.co.uk)
Tue, 26 Jan 1999 17:23:27 +0000 (GMT)


Hi

Can anyone offer any suggestions on a possible RAMDISK bug I have seen.

I wish to boot a system from a flash IDE drive into a 16Meg RAMDISK on a
system with 32 Meg installed. I have modified drivers/block/rd.c and
commented out the line that checks for a floppy as the root dev, this
allows me to at least load a compressed filesystem image from an HD into
RAMDISK.

The system I have uses about 11 meg of the 16. You would imagine I have a
little less than 16Meg available for application use. Actually I have
a few processes running from boot and free reports only about 6Meg
left.

I tried running some programs that would allocate memory until failure to
confirm what was really available (because I though 6 was a little low)

I wrote a program that would malloc single large blocks. With this I can
malloc 23 Meg before failure. (malloc returns NULL)

Thinking there was a problem, I changed this to use calloc instead. If I
tried to calloc more than 10 Meg, the machine locked up. Between 6 and 10 it
would usually keep going for a while, but lock up later. I tried running
these programs as nobody rather than root. Same result. If I were running any
other programs (eg 'top') in another session, this would usually bomb with a
bus error at the same time. The callocing app might also bomb with a bus
error before the machine locked. I am doing this stuff over a telnet session,
I haven't tried it on a console.

It is as if the RAMDISK code as not marked the buffers it uses as
unavailable for app code. I looked through the code and see it sets the
BH_Protected flag in the file buffer structs. However I also see that
there are 2 or 3 places (fs/buffers.c and somewhere in ext2 hierarchy)
where these can be cleared.

Can anyone offer any help/comments/suggestions ?

Many thanks

Bill Melotti
Cognito Ltd UK

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

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