Subject: Re: wd, disk write cache, sync cache, and softdep.
To: Daniel Carosone <dan@geek.com.au>
From: Jason Thorpe <thorpej@shagadelic.org>
List: tech-kern
Date: 12/16/2004 14:04:04
--Apple-Mail-12-373393465
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII; format=flowed


On Dec 16, 2004, at 12:18 PM, Daniel Carosone wrote:

> The thing I liked about the completion queue idea is that it stays
> etirely within the disk driver layer, and merely restores the disk
> semantics that are assumed by all the upper layers: biodone buffers
> are safely on stable storage.
>
> The ideas are not incompatible, of course: arrival of one a write with
> one of these force flags would be another condition to trigger a sync
> cache.

I think you are going down the road of "really bad performance" with 
this.

What if the drive has a non-volatile cache?

Why issue two commands for this when one will do (in the case of SCSI 
and the FUA bit).

> I wasn't aware that there was a problem for SCSI disks, as Bill
> suggests, by the way. I don't know if the filesystems are smart
> enough, or have the interface to indicate, that a given write should
> be done as a tagged or ordered command, or whether they just wait to
> issue later writes until earlier ones are returned.

You don't have to care about this.  The application (in this case, FFS 
or whatever) enforces its own barriers of this type, by simply not 
starting an I/O before its dependant I/O is known to have completed.  
There is no need for us to fiddle with SIMPLE and ORDERED tags... just 
let the driver issue SIMPLE all it wants.

         -- Jason R. Thorpe <thorpej@shagadelic.org>


--Apple-Mail-12-373393465
content-type: application/pgp-signature; x-mac-type=70674453;
	name=PGP.sig
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (Darwin)

iD8DBQFBwgZVOpVKkaBm8XkRAhQrAJ97h9zBPrz7Ki7WYfKi7YhJdlfwFwCgtCvN
dAyDr1u6fNQXtmos6FIJJ/s=
=qO3M
-----END PGP SIGNATURE-----

--Apple-Mail-12-373393465--