Subject: Re: msdosfs performance problem
To: None <tech-kern@netbsd.org>
From: Michael van Elst <mlelstv@serpens.de>
List: tech-kern
Date: 11/27/2005 12:35:24
tonnerre@thundrix.ch (Tonnerre LOMBARD) writes:

>Each write to a cluster requires an update of the linked cluster lists.

Yes, but that's a write and not a read and the read should be
cached (there are only 2*63 sectors of FAT). Even the writes
should be cached since we are talking about changing the same
block over and over again.

So coming back to the original question. A write is done by
a ubc_alloc(), uiomove() and ubc_release().

As far as I understand this, the uimove() just copies data
in memory and the first access to the mapped block does
a page-in which _reads_ the old data from the disk, so that
it can be partially overwritten.

But it isn't necessary to read the old data if it is completely
overwritten. Does uiomove() optimize this case?

-- 
-- 
                                Michael van Elst
Internet: mlelstv@serpens.de
                                "A potential Snark may lurk in every tree."