Re: Buffer cache

From: Tigran Aivazian (tigran@veritas.com)
Date: Fri Aug 11 2000 - 08:34:51 EST


On Fri, 11 Aug 2000, Leeuw van der, Tim wrote:
> If you write the new data to disk with the write() statement, the write will
> go thru the buffercache

no, it won't actually, for most (all?) filesystems. Have you checked the
code? Most filesystems set their ->write() method to generic_file_write()
which means writes go through page cache and not buffer cache.

The buffer cache is used mainly for metadata things like getting the
correct disk block containing a given inode per given i_ino etc.

(I am talking only about latest kernels, of course)

So, the answer to his question depends on lots of things (like readahead)
and the next read() may or may not actually cause some io from disk to
happen.

Regards,
Tigran

-
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/



This archive was generated by hypermail 2b29 : Tue Aug 15 2000 - 21:00:24 EST