Messages in this thread | | | Date | Sun, 26 Dec 1999 02:28:24 -0800 (PST) | From | Tigran Aivazian <> | Subject | Re: [PATCH] 2.3.34/pre-2.3.35-3 ramdisk/initrd NOT as a |
| |
Hi,
Sorry it took me so long (washing dishes after christmas dinner takes much longer thank breaking Linux ramdisk :) - I just reproduced it properly so here are the steps:
1. compile 2.3.35-pre3 UP, 586TSC, ramdfisk as module with latest patch posted by Frank.
2. insmod rd rd_size=25000 rd_blocksize=512
3. take a file stand.img, size=22M
4. write a shell script:
dd if=stand.img of=/dev/ram0 & ..... dd if=stand.img of=/dev/ram5 &
instant oom. Now do the same with my version (using vmalloc()) - everything is fine - all the excessive dd's just fail nicely with ENOMEM.
I think this is similar to a philosophical issue that goes back to Linux+AIX vs SVR4+others wrt to VM "preallocation" policy, i.e. I think it is better to use vmalloc() and refuse creating such large ramdisk in the beginning instead of trying to protect too many buffers and end up with OOM.
However, I say the above because I don't know of a clever way to restrict using up too many buffers - hence I printed out 20,000 lines of code yesterday in hope to read it all during xmas break :)
Regards, Tigran.
On Sun, 26 Dec 1999, Linus Torvalds wrote:
> > > On Sun, 26 Dec 1999, Tigran Aivazian wrote: > > > > Fortunately thekernel is still > > on 2.3.35-pre3 so I might be able to make the testcase ready before > > Linus makes the next version (assuming he is asleep now). > > Hah! Sleep? I've heard of it. > > Linus >
- 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/
| |