Subject: Re: write cache on ATA drives
To: Tom Vier <tmv@comcast.net>
From: Thor Lancelot Simon <tls@rek.tjls.com>
List: tech-kern
Date: 12/09/2002 20:55:15
On Mon, Dec 09, 2002 at 08:37:26PM -0500, Tom Vier wrote:
> 
> right, it's writeback caching. it returns cmd success right after it gets
> the cmd. do you mean that ordered tags aren't being honored by some scsi
> drives?
> 
> i'm not an expert on scsi (and definetly not ata). is there a write barrier
> flag for cmd tags? how do ordered tags work?

The rule is simple:  ordered tags are performed in-order, and simple tags
may be reordered, depending on the drive's configuration -- but all 
outstanding simple tags must be completed before any ordered tag completes.

In other words, ordered tags are barriers with regard to simple tags.

When you turn on write caching, however, all bets are off.  After all, the
drive will cache even simple, *untagged* commands -- and it'll almost
certainly return completion for tagged commands before they hit the actual
disk.  That's why correctly using tagged commands to allow the drive to
cache data is a lot better than just turning on the write cache in the
appropriate mode page.

Thor