Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Jul 2004 15:50:59 -0700 (PDT)
From:      Don Lewis <truckman@FreeBSD.org>
To:        scottl@FreeBSD.org
Cc:        bugghy@home.ro
Subject:   Re: magic sysrq keys functionality
Message-ID:  <200407262251.i6QMoxpp058509@gw.catspoiler.org>
In-Reply-To: <20040726155712.R32601@pooker.samsco.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200407262251.i6QMoxpp058509>