Re: Buffer and Page cache coherent? was: Strange IDE performance change in 2.6.1-rc1 (again)

From: Mike Fedyk
Date: Sun Jan 04 2004 - 18:46:56 EST


On Sun, Jan 04, 2004 at 03:32:58PM -0800, Andrew Morton wrote:
> Mike Fedyk <mfedyk@xxxxxxxxxxxxx> wrote:
> >
> > On Sun, Jan 04, 2004 at 02:10:30PM -0800, Andrew Morton wrote:
> > > Mike Fedyk <mfedyk@xxxxxxxxxxxxx> wrote:
> > > >
> > > > On Sat, Jan 03, 2004 at 02:40:03PM -0800, Andrew Morton wrote:
> > > > > No effort was made to optimise buffered blockdev reads because it is not
> > > > > very important and my main interest was in data coherency and filesystem
> > > > > metadata consistency.
> > > >
> > > > Does that mean that blockdev reads will populate the pagecache in 2.6?
> > >
> > > They have since 2.4.10. The pagecache is the only cacheing entity for file
> > > (and blockdev) data.
> >
> > There was a large thread after 2.4.10 was released about speeding up the
> > boot proces by reading the underlying blockdev of the root partition in
> > block order.
> >
> > Unfortunately at the time reading the files through the pagecache would
> > cause a second read of the data even if it was already buffered. I don't
> > remember the exact details.
>
> The pagecache is a cache-per-inode. So the cache for a regular file is not
> coherent with the cache for /dev/hda1 is not coherent with the cache for
> /dev/hda.

That's what I remember from the old thread. Thanks.

Duffers are attached to a page, and blockdev reads will not save
pagecache reads.

So in what way is the buffer cache coherent with the pagecache?

> > Are you saying this is now resolved? And the above optimization will work?
>
> It will not. And I doubt if it will make much difference anyway. I once
> wrote a gizmo which a) generated tables describing pagecache contents
> immediately after bootup and b) used that info to prepopulate pagecache
> with an optimised seek pattern after boot. It was only worth 10-15%. One
> would need an intermediate step which relaid-out the relevant files to get
> useful speedups.

Any progress on that pagecache coherent block relocation patch you had for
ext3? :)
-
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/