qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jamie Lokier <jamie@shareable.org>
To: qemu-devel@nongnu.org
Cc: Laurent Vivier <Laurent.Vivier@bull.net>
Subject: Re: [Qemu-devel] [PATCH] Align file accesses with cache=off	(O_DIRECT)
Date: Wed, 30 Apr 2008 01:02:19 +0100	[thread overview]
Message-ID: <20080430000217.GB25408@shareable.org> (raw)
In-Reply-To: <48173591.9010609@suse.de>

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

      parent reply	other threads:[~2008-04-30  0:02 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-17 13:31 [Qemu-devel] [PATCH] Align file accesses with cache=off (O_DIRECT) Kevin Wolf
2008-04-28 15:34 ` Kevin Wolf
2008-04-29  9:01   ` Laurent Vivier
2008-04-29 14:49     ` Kevin Wolf
2008-04-29 15:48       ` Laurent Vivier
2008-04-29 16:21         ` Kevin Wolf
2008-04-29 16:48           ` Laurent Vivier
2008-04-30  9:21             ` Kevin Wolf
2008-04-30  9:59               ` Laurent Vivier
2008-04-30 12:08                 ` Kevin Wolf
2008-04-30 14:30                   ` Blue Swirl
2008-04-30 21:05                     ` Kevin Wolf
2008-05-01 14:35                       ` Blue Swirl
2008-05-01 17:55                         ` Kevin Wolf
2008-05-06  8:44                           ` Kevin Wolf
2008-05-06  9:02                             ` Laurent Vivier
2008-05-06 16:42                             ` Blue Swirl
2008-05-06 16:56                               ` Kevin Wolf
2008-05-06 17:23                                 ` Blue Swirl
2008-04-30  0:05           ` Jamie Lokier
2008-04-30  0:02       ` Jamie Lokier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080430000217.GB25408@shareable.org \
    --to=jamie@shareable.org \
    --cc=Laurent.Vivier@bull.net \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).