Re: inode->i_dirty_buffers redundant ?

Stephen C. Tweedie
2001-01-26T11:37:49Z

Hi,

On Thu, Jan 25, 2001 at 09:05:54PM +0100, Daniel Phillips wrote:
> "Stephen C. Tweedie" wrote:
> > We also maintain the
> > per-page buffer lists as caches of the virtual-to-physical mapping to
> > avoid redundant bmap()ping.
>
> Could you clarify that one, please?

The buffer contains a physical label for the block's location on disk.
The page cache is indexed purely by logical location, so doing IO
to/from the page cache requires us to lookup the physical locations of
each block within the page.

Caching the buffer_heads for page cache pages means that once those
lookups are done once, further IO on the same page can bypass the
lookup and go straight to disk.

--Stephen