Re: [PATCH] 2.4.x write barriers (updated for ext3)

Chris Mason
2002-02-22T15:27:39Z

On Friday, February 22, 2002 02:19:15 PM +0000 "Stephen C. Tweedie" <sct@redhat.com> wrote:

>> There might be additional spots in ext3 where ordering needs to be
>> enforced, I've included the ext3 code below in hopes of getting
>> some comments.
>
> No. However, there is another optimisation which we can make.
>
> Most ext3 commits, in practice, are lazy, asynchronous commits, and we
> only nedd BH_Ordered_Tag for that, not *_Flush. It would be easy
> enough to track whether a given transaction has any synchronous
> waiters, and if not, to use the async *_Tag request for the commit
> block instead of forcing a flush.

Just a note, the scsi code doesn't implement flush at all, flush
either gets ignored or failed (if BH_Ordered_Hard is set), the
assumption being that scsi devices don't write back by default, so
wait_on_buffer() is enough.

The reiserfs code tries to be smart with _Tag, in pratice I haven't
found a device that gains from it, so I didn't want to make the larger
changes to ext3 until I was sure it was worthwhile ;-)

It seems the scsi drives don't do tag ordering as nicely as we'd
hoped, I'm hoping someone with a big raid controller can help
benchmark the ordered tag mode on scsi. Also, check the barrier
threads from last week on how write errors might break the
ordering with the current scsi code.

-chris