On Thu, Jan 13, 2005 at 12:29:01AM +0200, guy keren wrote:

> in fact, it's very hard to achieve a proper "which process caused this
> I/O" log. consider the case where two processes wrote to the same position
> in a file - there's likely to be only one disk write operation - which of
> the two processes will you account this I/O against?

Whichever caused this block to be read into the page cache.

> also, what about read-ahead? when a process reads data from the disk, the
> operating system typically performs a read-ahead. in fact, sometimes the
> mere opening of a file will cause the VFS layer to perform read-ahead of
> data for the file - even if your application didn't read anything.

That's IO caused on behalf of the process. 

> thus, you should try to _properly_ define what is it that you're trying to
> account for, including those 'multiple updates - single disk I/O'
> and 'read ahead' cases.

I fully support this statement :-)

Cheers, 
Muli
-- 
Muli Ben-Yehuda
http://www.mulix.org | http://mulix.livejournal.com/

Attachment: signature.asc
Description: Digital signature

Reply via email to