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 0/6] xenblk: Add O_DIRECT and O_SYNC support.

To: Jens Axboe <jens.axboe@xxxxxxxxxx>
Subject: Re: [Xen-devel] [patch 0/6] xenblk: Add O_DIRECT and O_SYNC support.
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Wed, 05 Nov 2008 09:53:08 +0000
Cc: Xen-devel@xxxxxxxxxxxxxxxxxxx, kurt.hackel@xxxxxxxxxx, shinya.narahara@xxxxxxxxxx, Joe Jin <joe.jin@xxxxxxxxxx>, greg.marsden@xxxxxxxxxx, wen.gang.wang@xxxxxxxxxx
Delivery-date: Wed, 05 Nov 2008 01:53:16 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20081105094258.GJ21867@xxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Ack/LE41jQKZ3KsfEd2X2wAWy6hiGQ==
Thread-topic: [Xen-devel] [patch 0/6] xenblk: Add O_DIRECT and O_SYNC support.
User-agent: Microsoft-Entourage/11.4.0.080122
On 5/11/08 09:42, "Jens Axboe" <jens.axboe@xxxxxxxxxx> wrote:

> On Wed, Nov 05 2008, Keir Fraser wrote:
>> O_DIRECT doesn't
>> mean writes are synchronous to the platters -- just means the buffer cache
>> is bypassed -- which should generally be the case on the blkback side always
>> anyway.
> 
> Ehm, yes it does. When a write(2) returns for an fd that has been opened
> with O_DIRECT, that io WILL have gone to the disk. So it's as close to
> 'sync to platter' as we can be without fiddling with the write cache on
> the device, there's even talk of making it fully platter sync by
> switching on FUA (forced unit access) in the write command, which would
> make it always direct-to-platter regardless of device cache setting.

Okay, I was going by the open() man page description which only talks about
interactions with the buffer cache. Even so, when the Xen block-device is
backed by a raw partition (Oracle's test scenario), there should be nothing
the Xen drivers need to do. They generate their asynchronous response to the
frontend only after the backend gets the async callback from the backend
domain's block-device layer. Presumably something in the filesystem or
generic blkdev layer in the frontend VM will be making the write()ing
process block until such responses are gathered.

 -- Keir



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

<Prev in Thread] Current Thread [Next in Thread>