Re: magic sysrq keys functionality

From: Don Lewis <truckman_at_FreeBSD.org>
Date: Mon, 26 Jul 2004 15:50:59 -0700 (PDT)
On 26 Jul, Scott Long wrote:
> On Mon, 26 Jul 2004, Matthias Andree wrote:

>> BTW, is proper write order guaranteed on SCSI drives through ordered
>> tags? softdep doesn't really like blocks being written in different
>> order than scheduled.
>>
> 
> I don't believe that any order is guaranteed.  FreeBSD used to have the
> concept of a B_ORDERED bio flag that would help order the bioq, but it was
> removed early in the 5-current cycle due to apparent non-use.  It's tough
> to rely on ATA Flush Cache since many devices exist that advertise it but
> don't actually support it (i.e. they lock up if you try it).  SCSI
> certainly supports it, but again it was information that was never getting
> to the device.

We don't care in the SCSI case as long as write caching is disabled on
the drive.  The drive is free to optimize the order of the set of
commands that have been submitted to it as long as it doesn't return the
completion status until the data hits the platter.  Softdep won't send
any write commands to the drive that are dependent on any outstanding
write commands until it gets the completion status, which is how it
enforces the ordering of a sequence of writes when it cares about the
order.

The important thing to remember is use camcontrol to turn off the WCE
bit, since every drive I've purchased in the last several years has it
turned on.  If you forget that, you can even get hosed if you think you
are doing synchronous writes (either in the file system code or with
fsync()).  When soft-updates is enabled, I don't see any significant
performance difference between the WCE enabled and disabled cases in my
normal system usage.
Received on Mon Jul 26 2004 - 20:51:46 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:03 UTC