qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Frediano Ziglio <freddy77@gmail.com>
Cc: Kevin Wolf <kwolf@redhat.com>, Christoph Hellwig <hch@lst.de>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 1/2] linux aio: support flush operation
Date: Wed, 27 Jul 2011 21:57:19 +0200	[thread overview]
Message-ID: <20110727195718.GA16212@lst.de> (raw)
In-Reply-To: <77083DC7-E37C-4B44-9A59-DB19E34D20E2@gmail.com>

On Wed, Jul 27, 2011 at 09:52:51PM +0200, Frediano Ziglio wrote:
> > 
> 
> Yes! Not at kernel level :-)

In that case we have a bad error handling problem somewhere in qemu.
the IOCB_CMD_FDSYNC aio opcode will always return EINVAL currently,
and we really should have cought that somewhere in qemu.

> Thanks. I'll try to port misaligned access to Linux AIO. Also I'll add some comments on code to avoid somebody do the same mistache I did.

It's direct I/O code in general that doesn't handle misaligned access.
Given that we should never get misaligned I/O from guests I just didn't
bother duplicating the read-modify-write code for that code path as well.

> Mainly however -k qemu-img and aio=native in blockdev options are silently ignored if nocache is not enabled.

Maybe we should indeed error out instead.  Care to prepare a patch for that?

> Also I notice that combining XFS, Linux AIO, O_DIRECT and O_DSYNC give impressive performance but currently there is no way to specify all that flags together cause nocache enable O_DIRECT while O_DSYNC is enabled with writethrough.

Indeed.  This has come up a few times, and actually is a mostly trivial
task.  Maybe we should give up waiting for -blockdev and separate cache
mode settings and allow a nocache-writethrough or similar mode now?  It's
going to be around 10 lines of code + documentation.

  reply	other threads:[~2011-07-27 19:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-27 18:25 [Qemu-devel] [PATCH 0/2] improve Linux AIO support Frediano Ziglio
2011-07-27 18:25 ` [Qemu-devel] [PATCH 1/2] linux aio: support flush operation Frediano Ziglio
2011-07-27 18:31   ` Christoph Hellwig
2011-07-27 19:52     ` Frediano Ziglio
2011-07-27 19:57       ` Christoph Hellwig [this message]
2011-07-28  7:47         ` Kevin Wolf
2011-07-28 12:15           ` Christoph Hellwig
2011-07-28 12:41             ` Kevin Wolf
2011-07-29 14:24               ` Christoph Hellwig
2011-07-29 15:33             ` Stefan Hajnoczi
2011-07-27 18:25 ` [Qemu-devel] [PATCH 2/2] aio: use Linux AIO even if nocache is not specified Frediano Ziglio
2011-07-27 18:32   ` Christoph Hellwig

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=20110727195718.GA16212@lst.de \
    --to=hch@lst.de \
    --cc=freddy77@gmail.com \
    --cc=kwolf@redhat.com \
    --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).