All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@suse.de>
To: Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk>
Cc: xen-devel@lists.xensource.com
Subject: Re: [patch] Add support for barriers to blk{back,front} drivers.
Date: Mon, 23 Oct 2006 14:27:43 +0200	[thread overview]
Message-ID: <453CB53F.8060908@suse.de> (raw)
In-Reply-To: <3AAA99889D105740BE010EB6D5A5A3B205071C@paddington.ad.cl.cam.ac.uk>

Ian Pratt wrote:
>  
>> It's about correctness, not about performance.  I've talked 
>> with Jens Axboe about it a while ago.  Barriers are 
>> *required* for journaling filesystems to work reliable.  
> 
> I just don't believe that. If the underlying device doesn't support
> barriers Linux should just stop issuing requests until it has the
> completion notifcation back for *all* the outstanding IOs to the device,
> and then start issuing the new batch of IOs.  

That is what actually happens, that isn't enough in all cases though.

> I'd be incredibly surprised if this is not what Linux does today for
> devices that don't support barriers. [NB: you still have the issue of
> disks that support write caching and lie and send the completion before
> data has hit the disk, but there's nothing you can do about that from
> the OS]

The write caching case is exactly the problematic one.  If you turn off
the disks write caching you are fine I think.  With write caching
enabled journaling is safe only together with barriers.  The kernel can
either use request tagging so the drive itself makes sure the write
order is correct or explicitly ask the drive to flush the write cache,
depending on what the hardware supports.

> I'd certainly be interested to see some benchmarks with and without the
> barrier support in blkfront/back.

I'll go run some ...

cheers,
  Gerd

-- 
Gerd Hoffmann <kraxel@suse.de>
http://www.suse.de/~kraxel/julika-dora.jpeg

  reply	other threads:[~2006-10-23 12:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-23 11:42 [patch] Add support for barriers to blk{back, front} drivers Ian Pratt
2006-10-23 12:27 ` Gerd Hoffmann [this message]
2006-10-25 16:52   ` [patch] Add support for barriers to blk{back,front} drivers Gerd Hoffmann
  -- strict thread matches above, loose matches on Subject: below --
2006-10-30 12:15 [patch] Add support for barriers to blk{back, front} drivers Ian Pratt
2006-10-30 12:43 ` [patch] Add support for barriers to blk{back,front} drivers Gerd Hoffmann
2006-11-08 15:38   ` Gerd Hoffmann
2006-11-09  1:04     ` [patch] Add support for barriers to blk{back, front} drivers Ian Pratt
2006-11-09  1:15       ` John Levon
2006-11-09  9:00     ` [patch] Add support for barriers to blk{back,front} drivers Keir Fraser
2006-11-09 12:48       ` Gerd Hoffmann
2006-11-09 13:47         ` Keir Fraser
2006-11-09 14:15           ` Gerd Hoffmann
2006-10-27 13:46 [patch] Add support for barriers to blk{back, front} drivers Ian Pratt
2006-10-30  8:21 ` [patch] Add support for barriers to blk{back,front} drivers Gerd Hoffmann
2006-10-20  8:38 [patch] Add support for barriers to blk{back, front} drivers kraxel
2006-10-20 20:35 ` Ian Pratt

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=453CB53F.8060908@suse.de \
    --to=kraxel@suse.de \
    --cc=m+Ian.Pratt@cl.cam.ac.uk \
    --cc=xen-devel@lists.xensource.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.