Write Caching

jmcgrath at qntm.com jmcgrath at qntm.com
Fri Mar 18 12:35:46 PST 1994


                      Subject:                              Time:  12:00 PM
  OFFICE MEMO         Write Caching                         Date:  3/18/94

The following information was distributed to the RAID Advisory Board.
Given our discussions in the SCSI working group, we should
incorporate some of this into a standard document (perhaps
Block commands).  --  Jim

(PS Larry - could you give me a document number for this?)


This section is designed to be inserted into the standard at a
location determined by the editor.  It's intent is to describe
the requirements of a useful feature for RAID Ready Drives
- write caching.

Revision 2.0

I added the FUA requirement that was written on copies
of revision 1.

I added the requirement that the device ignore attempts
to disable error recovery and auto reallocation for cached
write data.


Write Caching

Blocks on a device which are updated by using cached
writes must have the same availability characteristics
as those updated by using non-cached writes.  Under only
two circumstances will there be a detectable difference
between blocks updated with cached writes and those
updated with non-cached writes: device power loss and
catastrophic device failure.

Specifically, once a device caches a write of a block, it
must insure that all subsequent reads of that block return
the most recently written data (i.e. data in the last nexus
created at the device).  This is true despite any external
device activity (SCSI bus, power supply quality, shock,
vibration, temperature, emi) , as long as it is within the
device specification.

To insure this, SCSI devices are specifically required to
preserve data availability despite the following events:

o	SCSI bus (hard) RESET condition
o	SCSI bus device RESET condition
o	SCSI bus errors
o	unexpected BUS FREE conditions
o	recoverable write errors (via error recovery)
o	unrecoverable write errors (via automatic reallocation)	

When data is being written back to the disk the device shall
ignore any user specified constraints on error recovery and
automatic reallocation.  It shall always invoke error recovery
and auto reallocation.

A SCSI device may not preserve data availability if a
catastrophic error occurs.  Usually such an error would
require the replacement of the device in the RAID.

A SCSI device may implement any of three different levels
of data availability as a function of loss of power to the device:


Non-Volatile: after the device has indicated that the write has
been completed (by sending the COMMAND COMPLETE message),
no possible interrupt of power supply will reduce data availability.


Limited Volatility:  after the device has indicated that the
write has been completed (by sending the COMMAND COMPLETE
message), an interruption of power supply may reduce data
availability.  For any given block of data the time during
which it may be subject to reduction in data availability
is called the window of vulnerability.  This reduction of
data availability is limited by the following:

o	Any command other than SEEK, READ, or WRITE will implicitly
    synchronize the write cache with respect to the device.  A write
    command with the FUA bit set (FUA support is mandatory) will
    also implicitly synchronize the cache.  At the end of that command
    all previously cached writes will have the same data availability
    as they would in the non-volatile implementation.
o	In any sequence of M cached writes, after a power interruption
    only the updated data for the last N writes (where M>= N) may be
    unavailable (i.e. cached writes shall not be reordered).
o	For any block, the window of vulnerability shall not exceed the
    time that the block would have normally resided in host memory
    (i.e. cached writes are synchronized at least as fast as they would
    have been executed without caching).  Note that for testing purposes
    the system without write caching should be configured with the same
    error recovery parameters as used by the write caching feature and
    auto reallocation shall be enabled.


Volatile:  after the device has indicated that the write has been
completed (by sending the COMMAND COMPLETE message), an
interruption of power supply may reduce data availability.  This
reduction of data availability is limited by the following:

o	The SYNCHRONIZE CACHE command will synchronize the write
    cache with respect to the device.  At the end of that command
    all previously cached writes will have the same data availability
    as they would in the non-volatile implementation.










More information about the T10 mailing list