lkml.org 
[lkml]   [1999]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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/

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.024 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site