[lkml]   [2001]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: DVD blockdevice buffers

On Fri, May 25, 2001 at 09:09:37AM -0600, Eric W. Biederman wrote:

> The case we don't get quite right are partial reads that hit cached
> data, on a page that doesn't have PG_Uptodate set. We don't actually
> need to do the I/O on the surrounding page to satisfy the read
> request. But we do because generic_file_read doesn't even think about
> that case.

That's *precisely* the case in question. The whole design of the page
cache involves reading entire pages at a time, in fact. We _could_
read in only partial pages, but in that case we end up wasting a lot
of the page.

> For the small random read case we could use a
> mapping->a_ops->readpartialpage
> function that sees if a request can be satisfied entirely
> from cached data. But this is just to allow generic_file_read
> to handle this, case.

Agreed. The only case where blockdev-in-pagecache really results in
significantly more IO is partial writes followed by partial reads.
Reads from totally-uncached pages ought to just fill the entire page
from disk; it's only when there is something already present
in the cache for that page that we want to look for partial buffers.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:53    [W:0.107 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site