2009/3/4 Peter Teoh <htmldeveloper@xxxxxxxxx>: > all the question u asked are answered by yourself. :=). > > but i do have some questions (MinChan or anyone else can help?): > > a. after mounting the ramdisk or loopback file as devices, and > configuring it as say, ext2 filesystem, all I/O processing go through > the same processing sequence: syscalls->vfs layer->ext2 FS > layer->pagecache layer->block layer->block devices->loopback > (drivers/block/loop.c) or ramdisk (drivers/block/brd.c) layer, > correct? > > Now the problem with that is "double buffering" or duplicated caching > -> one at the pagecache layer, and another at the ramdisk level. > > (don't forget another duplication of caching between userspace memory > and pagecache). > > Or is Linux Kernel much smarter than that? > > b. At the "block layer" processing as listed in sequence above, it > will be subjected to I/O scheduling. Correct? But since ramdisk > are not subjected to any I/O latency problems, should this read over > write prioritizing (or batching of read/write) as done by I/O > scheduler be unnecessary? > > On Tue, Mar 3, 2009 at 4:48 PM, loody <miloody@xxxxxxxxx> wrote: >> Dear all: >> 2. The only differences between them is loopdevice uses file as >> virtual device and ramdisk uses memory as virtual device >> (if it is also right, why we first use dd if=file_name >> of=/dev/loop, then we mount -o loop /dev/loop /mnt. >> It seems we copy the file content to a virtual memory device, >> /dev/loop, then mount it. >> So we still use a block of ram to simulation the file operation, right?) >> thanks for your help, >> miloody Hi: Thanks for your help first. If my above assumptions are correct. from 2 above, could i say loopback is also a ramdisk device. In ramdisk, we "dd if=/dev/null of=/dev/ram0" in loopdevice, we "dd if=file_name of=/dev/loop" it seems the only difference is loopback device copy the content of file to /dev/loop, but ramdisk re-makes a ext2 in /dev/ram0. appreciate your help, miloody -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ