Subject: Re: write cache on ATA drives
To: Jason R Thorpe <thorpej@wasabisystems.com>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-kern
Date: 12/09/2002 23:27:25
On Mon, Dec 09, 2002 at 02:22:15PM -0800, Jason R Thorpe wrote:
> On Mon, Dec 09, 2002 at 10:20:21PM +0100, Manuel Bouyer wrote:
> 
>  > This is easy to do. Unfortunably, I don't think the filesystems will pass
>  > us this info ...
> 
> Right, the file system needs to insert explicit barriers.  For SCSI
> disks, this would issue a "SYNCHRONIZE CACHE" command.

This would be expensive. I think you just need to know *some* commands are
written to disk, but not all of them. So it's probably better to have this
information per command, instead of barriers that would flush the whole cache.

> 
> I've discussed the need for this with Kirk McKusick on at least 2
> occasions, but it's been ... extraordinarily hard to convince him
> that it's needed.  His response is always "well, use tagged queueing
> then", but what he keeps missing is that the data might not be on
> the media *even if the disk says the command has completed*.

Hum, I think with tagged queuing, the command won't complete before
data is on the media.
Without tagged queuing, all can happen ...
Hum, this may be a good reason to finally implement tagged queuing for IDE :)

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 23 ans d'experience feront toujours la difference
--