WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [patch] Add support for barriers to blk{back,front} driv

To: Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] [patch] Add support for barriers to blk{back,front} drivers.
From: Gerd Hoffmann <kraxel@xxxxxxx>
Date: Mon, 23 Oct 2006 14:27:43 +0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 23 Oct 2006 05:28:11 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <3AAA99889D105740BE010EB6D5A5A3B205071C@xxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <3AAA99889D105740BE010EB6D5A5A3B205071C@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.7 (X11/20060911)
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@xxxxxxx>
http://www.suse.de/~kraxel/julika-dora.jpeg

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel