Hi,
Since the change in kernel 2.4, read and writes go both through the page and
buffer cache. Is the cached data held twice (i.e. uses twice the memory)? I
noticed that the struct page holds a pointer to a buffer-head list; does
that list contain actual data, or just pointers into the cached page data?
Thanks,
Amir.
On Thu, Sep 11, 2003 at 05:30:05PM +0200, Amir Hermelin wrote:
> Hi,
> Since the change in kernel 2.4, read and writes go both through the page and
> buffer cache.
That change was in 2.4.10 with the andrea VM merge. Though, I wouldn't use
it until about 2.4.14/16+ (don't use 2.4.15)
> Is the cached data held twice (i.e. uses twice the memory)? I
> noticed that the struct page holds a pointer to a buffer-head list; does
> that list contain actual data, or just pointers into the cached page data?
Others have asked before about this.
But let me inject some hearsay:
With the buffer & pagecache merge patch, there is much less duplication of
data, but still some. Also, pagecache doesn't reference into buffer cache
and the same data can be read twice (ie, if you're reading directly from
/dev/hda, and a filesytem on /dev/hdaX at the same time).
There is less duplication in 2.6, but I believe pagecache still doesn't
reference to buffer cache in there too.
Can someone say in more detail?