From: Chris Mason <mason@suse.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: reiserfs-list@namesys.com, linux-kernel@vger.kernel.org, axboe@suse.de
Subject: Re: [PATCH] write barriers for 2.4.x
Date: Thu, 14 Feb 2002 21:25:42 -0500 [thread overview]
Message-ID: <3735390000.1013739942@tiny> (raw)
In-Reply-To: <E16bX3x-0001nu-00@the-village.bc.nu>
In-Reply-To: <E16bX3x-0001nu-00@the-village.bc.nu>
On Friday, February 15, 2002 01:21:20 AM +0000 Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
>> sure we only try to use tag commands when they are turned on for the
>> target, otherwise we can safely assume the drive won't do
>> other writes first.
>
> Is this guaranteed by the SCSI standards or do you need to issue some
> kind of cache flush as with IDE ?
We're sending the scsi ordered queue tag command, which the spec
says will be written after anything already received by the target,
and before anything it receives later on. I have no data
at all how well the drives follow the spec ;-)
The IDE changes issue cache flushes before the barrier write,
and then another flush after it, which gives us similar semantics.
>
>> With -o barrier, this is now:
>>
>> write X log blocks
>> write 1 commit block
>> wait.
>
> That will work nicely with the I2O controllers, and possibly (if its
> in the firmware as well as the .h file) the aacraid cards. In those
> cases I can often commit to battery backed ram rather than physical
> media.
>
> Do you have any idea of driving the cache write through rather than write
> back is likely to help here by evening out the commit wait for a flush?
>
Controllers that do write back caching should be helped by the reiserfs
usage changes. If we pretend they immediately tell the OS a write is
completed, unpatched reiserfs does this:
write X log blocks
wait on X log blocks (all already complete, so just a CPU loop)
write 1 commit
wait on 1 commit.
With the new code, the controller is more likely to get the commit in
time to merge the requests. Hopefully someone who knows more about scsi
can correct me, but I think the write back controller can ignore the
ordering rules (since battery backup should promise the request does hit
media eventually).
I think write through caches should be helped too, as long as they
are smart about how they do the write ordering. My scsi drive doesn't
seem to be very smart at all, it has been hard to find usage patterns
that show improvement. So far, only O_SYNC writes really show it.
I think that's what you were asking, sorry if I misunderstood the Q.
-chris
next prev parent reply other threads:[~2002-02-15 2:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20020213222535.C0A45E64F2@ns1.suse.com>
[not found] ` <3100680000.1013644053@tiny>
[not found] ` <20020213235651.AC212E6360@ns1.suse.com>
[not found] ` <3132400000.1013646727@tiny>
2002-02-15 0:56 ` [PATCH] write barriers for 2.4.x Chris Mason
2002-02-15 1:21 ` Alan Cox
2002-02-15 2:25 ` Chris Mason [this message]
2002-02-15 22:03 ` Chris Mason
2002-02-13 21:59 Chris Mason
[not found] ` <m3vgd1ufbt.fsf@merlin.emma.line.org>
2002-02-14 16:01 ` Chris Mason
2002-02-14 17:53 ` Chris Mason
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3735390000.1013739942@tiny \
--to=mason@suse.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=axboe@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=reiserfs-list@namesys.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox