Re: Request: I/O request recording
From: Bart Samwel
Date: Tue Jan 27 2004 - 14:19:29 EST
Andrew Morton wrote:
You could certainly do that. Given disk block #N you need to search all
files on the disk asking "who owns this block". The FIBMAP ioctl can be
used on most filesystems (ext2, ext3, others..) to find out which blocks a
file is using. See bmap.c in
http://www.zip.com.au/~akpm/linux/patches/stuff/ext3-tools.tar.gz
Unfortunately you cannot determine a directory's blocks in this way.
Ext3's directories live in the /dev/hda1 pagecache anyway. ext2's
directories each have their own pagecache.
OK, I've written something that does this (but only correctly for ext3).
I've put it here:
http://www.xs4all.nl/~bsamwel/bootup_prefetch.tar.gz
I haven't had the opportunity to do good measurements, so I don't really
know if it even increases performance. If anyone feels like benchmarking
this, I'd be very happy to hear from you. I don't really expect
performance increases, as the bootup scripts seem to have enough
processing to do to keep the system busy even without disk I/O. I wonder
if it might make a difference on a faster processor though, my system's
kind of sluggish by today's standards.
-- Bart
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/