lkml.org 
[lkml]   [2001]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: DVD blockdevice buffers


On Wed, 23 May 2001, Stephen C. Tweedie wrote:
> > that the filesystems already do. And you can do it a lot _better_ than the
> > current buffer-cache-based approach. Done right, you can actually do all
> > IO in page-sized chunks, BUT fall down on sector-sized things for the
> > cases where you want to.
>
> Right, but you still lose the caching in that case. The write works,
> but the "cache" becomes nothing more than a buffer.

No. It is still cached. You find the buffer with "page->buffer", and when
all of them are up-to-date (whether from read-in or from having written
to them all), you just mark the whole page up-to-date.

This _works_. Try it on ext2 or NFS today.

Now, it may be that the preliminary patches from Andrea do not work this
way. I didn't look at them too closely, and I assume that Andrea basically
made the block-size be the same as the page size. That's how I would have
done it (and then waited for people to find real life cases where we want
to allow sector writes).

So in short: the page cache supports _today_ all the optimizations. In
fact, you can, on NFS, do 4096 one-byte writes, and they will be (a)
coalesced into one write over the wire, and (b) will be cached in the page
and the page marked up-to-date.

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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