Subject: Re: about untar performance on -current
To: enami tsugutomo <enami@sm.sony.co.jp>
From: Chuck Silvers <chuq@chuq.com>
List: tech-kern
Date: 04/17/2001 21:52:22
On Wed, Apr 18, 2001 at 12:42:49PM +0900, enami tsugutomo wrote:
> > > Then, we need to flush top of new range also, don't we?  I.e., between
> > > trunc_page(off) & ~(bsize - 1) and trunc_page(off).
> > 
> > that will be flushed in ffs_write(), won't it?
> 
> Ah, yes, but as a result of work around (code inside #if 1..#else).
> 
> > (actually it's trunc_page(off) & ~(bsize - 1) to round_page(off).)
> 
> ffs_write() is responsible to flush trunc_page(start of region) and
> round_page(end of region).  but if full block is allocated, pages at
> the front of the block need to be flushed.  So, i wrote that `... to
> trunc_page(off)'.  Also, if the block is inside of existing hole, end
> of block also need to be flushed (tho, currently isn't necessary
> because of the work around).
> 
> Hm, is it better to flush at the end of ffs_write()?

ah, you're right, we do need to flush the whole block anyway.
and I don't see a problem with waiting until the end of the loop
and flushing the whole thing in one shot either.  I was just
imitating the buffer-based code more closely than necessary.

we should make the same changes in the other disk-based filesystems as well.

-Chuck