Messages in this thread | | | Date | Mon, 19 Apr 1999 01:46:41 +0530 (IST) | From | V Ganesh <> | Subject | Re: double read confusion |
| |
> From: "Peter J. Braam" <braam@cs.cmu.edu> > Assume that next we want to write in block 1, then ext2_getblk, calls > inode_getblk, which calls getblk, and, unless I'm mistaken, we go back > to the _disk_ to read the block. > > My confusion is about the following: why can't we share page cache > data with the buffer cache, eliminating the extra i/o?
we can. I tried this a month back, patched ext2_file_write to use the page cache if possible rather than do the I/O. also put in a /proc hook which showed how many I/Os we save. the result was a pathetic _32_ reads saved in a whole day of typical desktop activity (including kernel compiles). you can of course write a program to read a block, write a byte, read a block, write a byte etc., but such behaviour is quite rare in typical unix environments. anyway 2.3 shouldn't have this problem once the whole kludgy read-through- pagecache-write-through-buffer-cache routine is replaced with genetic_writepage and co.
ganesh
- 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/
| |