From: Martin Steigerwald <Martin@lichtvoll.de>
To: linux-xfs@oss.sgi.com
Subject: Re: XFS and write barrier
Date: Thu, 20 Jul 2006 12:34:41 +0200 [thread overview]
Message-ID: <200607201234.42293.Martin@lichtvoll.de> (raw)
In-Reply-To: <20060718192135.GV15160733@melbourne.sgi.com>
Am Dienstag 18 Juli 2006 21:21 schrieb David Chinner:
> > Hello David,
> >
> > well now it gets interesting. If both provide the same thing, whats
> > the difference?
>
> A WRITE_BARRIER I/O can be optimised by smart drivers, protocols and
> hardware to minimise the adverse effects of the barrier, whereas a
> cache flush is a brute force cache cleaning mechanism that cannot be
> optimised....
Hello David,
Thanks for your answer. I think now I understand it:
The driver and the drive does a cache flush immediately, but they can
delay a write barrier related cache flush as long as they make sure that
they has completed all of the io requests before the write barrier and
none of the io requests after the write barrier.
The smart driver of a smart drive that supports ordered requests may
additionally offload request ordering from the operating system to the
drive.
> > Does a device need to support more than this cache flush in order to
> > support barriers? Up to know I thought that when a device supports
> > cache flushes the kernel can provide barrier functinality for it.
>
> Not necessarily as different device/protocol commands are used.
Do you have any specific information link about this one?
AFAIK it should be possible to implement barrier functionality in the
driver as soon as the drive supports cache flushes. According to what I
understand from Documentation/block/barriers.txt, this is this case. That
would be
"iii. Devices which have queue depth of 1. This is a degenerate case
of ii. Just keeping issue order suffices. Ancient SCSI
controllers/drives and IDE drives are in this category."
in combination with this one:
"iii. Write-back cache and flush operation but no FUA (forced unit
access). We need two cache flushes - before and after the barrier
request."
The number of cache flushes can be reduced to one if FUA is used:
"iv. Write-back cache, flush operation and FUA. We still need one
flush to make sure requests preceding a barrier are written to medium,
but post-barrier flush can be avoided by using FUA write on the
barrier itself."
And then there are drives with queue depth greater 1 with support or do
not support ordered requests.
Ah, I think I finally got all of this and have a complete picture. Lets
see whether I can put that into a diagram or what ;-).
Regards,
--
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA B82F 991B EAAC A599 84C7
next prev parent reply other threads:[~2006-07-20 10:35 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-15 10:48 XFS and write barrier Martin Steigerwald
2006-07-15 19:28 ` Chris Wedgwood
2006-07-16 9:53 ` Martin Steigerwald
2006-07-17 0:43 ` Chris Wedgwood
2006-07-17 1:24 ` Chris Wedgwood
2006-07-16 17:32 ` Federico Sevilla III
2006-07-18 7:31 ` Nathan Scott
2006-07-18 8:58 ` Neil Brown
2006-07-18 17:04 ` David Chinner
2006-07-18 18:27 ` Martin Steigerwald
2006-07-18 19:21 ` David Chinner
2006-07-20 10:34 ` Martin Steigerwald [this message]
2006-07-22 9:31 ` Martin Steigerwald
2006-07-22 10:36 ` Stefan Smietanowski
2006-07-18 23:41 ` Neil Brown
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=200607201234.42293.Martin@lichtvoll.de \
--to=martin@lichtvoll.de \
--cc=linux-xfs@oss.sgi.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