[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [patch 0/6] xenblk: Add O_DIRECT and O_SYNC support.



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.