[Top][All Lists]

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

Re: [Qemu-devel] [PATCH] Align file accesses with cache=off (O_DIRECT)

From: Jamie Lokier
Subject: Re: [Qemu-devel] [PATCH] Align file accesses with cache=off (O_DIRECT)
Date: Wed, 30 Apr 2008 01:02:19 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

Kevin Wolf wrote:
> Disabling O_DIRECT for a single aio request is impossible (after all, 
> aio is asynchronous), and disabling it for at least one aio request is 
> going to be ugly.

You could try opening two fds to the same file/blockdev, one with
O_DIRECT set.  Then you can disable O_DIRECT as you like per aio
request, by choosing the fd.

I'm not sure if that works, though.  On some OSes, if a file has any
non-O_DIRECT open descriptor, all I/O is buffered ignoring the
O_DIRECT flag.  If both are allowed simultaneously, I'm not sure what
happens with cache-coherency between direct I/Os and buffered I/Os.

-- Jamie

reply via email to

[Prev in Thread] Current Thread [Next in Thread]