Re: [PATCH] 2.3.34/pre-2.3.35-3 ramdisk/initrd NOT as a

B. D. Elliott (bde@nwlink.com)
Sat, 25 Dec 1999 16:29:49 -0800


On Sat, Dec 25, 1999 at 03:28:37AM -0800, Tigran Aivazian wrote:
> Dear Linus and the World,
>
> Merry Christmas!
>
> You said recently about BDE's ramdisk fix (included in Frank's patch):
>
> > Looks good, applied.
>
> I agree that it looks very good but it has one problem - it can easily
> cause "VM: oom" events - just insmod rd with blocksize=512 and start
> filling up the minors dd'ing a large file to the corresponding /dev/ramX
> nodes.
>
> A simpler approach (using vmalloc()) as I suggested earlier does not
> result in the disaster described above. Therefore, perhaps it still makes
> sense to consider the patch below:
>
> http://www.ocston.org/~tigran/patches/ramdisk-2.3.35-pre2.patch
>
> Alternatively, if you really don't like vmalloc() idea one ought to
> investigate how to avoid those ooms.

I haven't been able to reproduce this condition with the version that was
submitted. On a 64MB machine I created 12 4MB ramdisks, did
"mke2fs /dev/rd/$i", and filled all of them with
"dd if=/dev/zero of=/rd.$i/big bs=1024 count=3933". There was some
swapping while writing the final one, to make enough space. I also tried
filling all of them by writing directly to each block device. Again there
was some swapping while filling the last one.

The first version of the patch (which I think is still on your web site),
had a bug which protected the wrong buffer in many/most cases. Perhaps this
is what you are using?

If you can reproduce this with the current version, please let me know
exactly how to do it.

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