Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Jul 2004 16:06:33 -0600 (MDT)
From:      Scott Long <scottl@freebsd.org>
To:        Matthias Andree <ma@dt.e-technik.uni-dortmund.de>
Cc:        bugghy <bugghy@home.ro>
Subject:   Re: magic sysrq keys functionality
Message-ID:  <20040726155712.R32601@pooker.samsco.org>
In-Reply-To: <m3hdrulbfk.fsf@merlin.emma.line.org>
References:  <1090718450.2020.4.camel@illusion.com> <200407251112.46183.doconnor@gsoft.com.au> <20040726175219.GA96815@green.homeunix.org> <m3hdrulbfk.fsf@merlin.emma.line.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 26 Jul 2004, Matthias Andree wrote:
> Scott Long <scottl@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



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