Re: magic sysrq keys functionality

From: Scott Long <scottl_at_freebsd.org>
Date: Mon, 26 Jul 2004 16:06:33 -0600 (MDT)
On Mon, 26 Jul 2004, Matthias Andree wrote:
> Scott Long <scottl_at_freebsd.org> writes:
>
> > GAH!  No, please don't start this war again!  The last time that we tried
> > turning this off in a release (4.1 IIRC), were were plagqued by months of
> > earthquakes, plagues, and deaths of first-born youngsters.  I 100% agree
> > that write caching in ATA is not compatible with data integrety, but the
> > ATA marketting machine has convinced us that cached+untagged speed is
> > better than uncached+tagged safety.  C'est la vie, or so they say here.
>
> Looking out of the cosy FreeBSD hut, for the Linux kernel, write barrier
> support (i. e. using the ATA cache flush facility on those drives that
> support it, and logging a warning if a drive doesn't) to enforce proper
> write order and synchronization is underway, with some distros already
> using it, for instance SuSE. It's not yet in the baseline code AFAIK.
>
> 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.  Some SCSI drivers compensate by sending periodic ordered
tags to help decrease the chances for an out-of-order commit, but it's
still a small gamble.  This works right now because we assume that disks
will commit blocks in order, and that assumption generally hasn't been
broken.  If legacy ATA were to drop off the face of the earth and drive
makers were to commit to producing honest and non-buggy firmware, I'd love
to bring back B_ORDERED and make it actually work.

Scott
Received on Mon Jul 26 2004 - 19:59:53 UTC

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