RAMDISK Bugs (fwd from LRP mailing list)

Paul Wouters (paul@xtdnet.nl)
Tue, 5 Jan 1999 21:43:14 +0100 (MET)


Bill, I forwarded your email to linux-kernel@vger.rutgers.edu. Someone there
should be able to answer you.

Paul

---------- Forwarded message ----------
Date: Tue, 5 Jan 1999 18:22:57 +0000 (GMT)
From: Bill Melotti <billm@cognito.co.uk>
To: linux-router@linuxrouter.org
Subject: [LRP] RAMDISK Bugs

Hi All

I am mailing this list with a possible bug relating to ramdisks. I am not
using the LRP package, but as LRP makes use of ramdisk, someone here
might know about my problem, or may know the maintainers of the code.

I am running Linux on an industrial PC. I have a SanDisk flash IDE drive
configured as the primary boot drive. The flash disk has two partitions,
one containing a compressed filesystems image and another containing a
real ext2 filesystem.

When the kernel boots, it expands the compressed image into a 16meg ramdisk,
leaving about 4 meg free in the ramdisk and mounts the real flash filesystem
separately. The machine has 32meg of RAM installed and I was keen to see how
much is left for application use. (Should be a bit less than 16 was my guess,
say 12 meg)

/proc/meminfo reported about 4 meg was left (but I am never sure this is
accurate) so I wrote two programs, one that would just malloc 1k blocks
until failure and report how many suceeded and another that would malloc
a huge blck of a requested size. The first program would lock the machine,
but the second block would let me malloc up to 23 meg. This was clearly
wrong, so I changed the code to do calloc and thus write to the block. I
only ever tried running this requesting a 10meg block. The machine locked
up.

I can try this on a system with real disks and it is fine. It is as if
the space used for ramdisk is not marked and the system happily dishes it
out to requesting apps.

Can anyone comment on this ? Is this a problem anyone has seen on the LRP
project ? And finally, does anyone have an E-Mail address for the RAMDISK
code maintainers ?

Many thanks for any help

Regards Bill Melotti

-
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/