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:43:18 +0000
Cc: Xen-Devel <Xen-devel@xxxxxxxxxxxxxxxxxxx>, Kurt Hackel <kurt.hackel@xxxxxxxxxx>, Greg Marsden <greg.marsden@xxxxxxxxxx>, Joe Jin <joe.jin@xxxxxxxxxx>, Shinya Narahara <shinya.narahara@xxxxxxxxxx>, Wen Gang Wang <wen.gang.wang@xxxxxxxxxx>
Delivery-date: Wed, 05 Nov 2008 01:43:23 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20081105093758.GI21867@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/Ku6KLNhzK6seEd2X2wAWy6hiGQ==
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:37, "Jens Axboe" <jens.axboe@xxxxxxxxxx> wrote:

>>> However, frontend driver could not got the write's flag at all.
>>> if we could know the request with O_SYNC flag should be easy to handle,
>>> need not touch filesystem layer.
>> 
>> So what does O_SYNC mean to Linux then? If it's not passed down to the
>> blkdev layer then it can only mean that requests must be synchronously
>> committed as far as that layer. I would therefore imagine you could lose as
>> much data natively as you do running on Xen. Where are these megabytes of
>> data sitting when they get lost, and why does it not happen when running
>> natively? If O_SYNC is not waiting for completion responses from the block
>> layer, that's a limitation of Linux's generic block subsystem, isn't it?
> 
> The block layer doesn't care, it's async by nature. What makes O_SYNC
> work is that callers will wait on the submitted writes afterwards, not
> returning a result until they have reached the drive (that's as far as
> that guarentee goes, beyond that you need flushes or barriers).
> 
> So it is definitely NOT a limitation of the block layer, that's very
> much how it is designed.

The issue at hand is whether Xen's block drivers need to handle O_SYNC
specially in any way. It sounds like it is actually handled properly at a
higher level (e.g. individual filesystems?) and hence the patches proposed
by Oracle make not much sense.

 -- Keir



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

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