cvs commit: src/sys/dev/ata ata-all.c ata-all.h ata-chipset.cata-dma.c ata-pci.c ata-pci.h

David Schultz das at FreeBSD.ORG
Tue Apr 8 18:11:08 PDT 2003


On Tue, Apr 08, 2003, Soeren Schmidt wrote:
> It seems Alexander Leidinger wrote:
> > Does this mean we can't use ATA-TQ in situations where we would use TQ
> > without WC on a SCSI system (read: does it affect softupdates)?
> 
> Well, this has newer been found out by hard evidence. The only vendor
> doing tags capable ATA disks doesn't want to tell, so we cant really
> know for sure. However tests here indicates that the "WC effect" is
> not in action when tags are enabled, but I could just have been 
> unusually lucky...

I think you just got lucky.  Steve Byan <stephen_byan at maxtor.com>
wrote this on fs@ a few months ago:

# ATA queuing is only useful for reads; ATA gets write-queuing by
# delayed-write caching. ATA queuing only allows disconnecting
# between sending the command and transferring the data; it
# doesn't allow disconnecting between transferring the data and
# transferring the status. Hence ATA queuing is useless for writes.

So ATA tags are a performance hack *only*, and they are orthogonal
to write caching.  However, softupdates doesn't care about the
absolute ordering of transactions; it just cares that you don't
call 'biodone(x)' until 'x' has been committed to stable storage.
In theory you might be able to safely enable write caching on ATA
disks if you send a FLUSH CACHE command every now and then and wait
for it to complete before making any calls to biodone().

For SCSI, I think write caching with command queuing works the way
you would want it to for writes[1], but apparently it is necessary
to set the FUA bit to force the device to commit the data before
completing the command.  Glancing at scsi_{da,all}.c, it doesn't
appear to me that we do that.  Comments from a SCSI guru would
be appreciated.


[1] Or so Google tells me.  I don't know much about SCSI.


More information about the cvs-src mailing list