qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Avi Kivity <avi@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/2] raw-posix: add Linux native AIO support
Date: Fri, 21 Aug 2009 16:48:52 +0200	[thread overview]
Message-ID: <20090821144852.GA22645@lst.de> (raw)
In-Reply-To: <4A8E6EAD.3030809@redhat.com>

On Fri, Aug 21, 2009 at 12:53:49PM +0300, Avi Kivity wrote:
> >+ * Queue size (per-device).
> >+ *
> >+ * XXX: eventually we need to communicate this to the guest and/or make it
> >+ *      tunable by the guest.  If we get more outstanding requests at a 
> >time
> >+ *      than this we will get EAGAIN from io_submit which is communicated 
> >to
> >+ *      the guest as an I/O error.
> >+ */
> >+#define MAX_EVENTS 128
> >   
> 
> Or, we could queue any extra requests.

That doesn't make much sense.    We'd just do an additional level of
queueing in addition to those already optimized implementation in the
guest and host kernels.  This is really just an issue of communicating
the limits we have and deal with it efficiently.  It should be a
relatively small add-on patch.

> >+    if (io_setup(MAX_EVENTS,&s->ctx) != 0)
> >+        goto out_close_efd;
> >+
> >   
> 
> One day we may want a global io context so we can dequeue many events 
> with one syscall.  Or we may not, if we thread these things.

Wecould do this easily, in fact that's what I did before I run into
issues with the completion queue size when using multiple devices.

Syscall overhead in Linux is small enough that I would not bother until
it actually shows up as a problem.  That beeing said threading the block
layer would probably be a benefit for large setups for various reasons.

  reply	other threads:[~2009-08-21 14:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-20 14:58 [Qemu-devel] [PATCH 0/2] native Linux AIO support revisited Christoph Hellwig
2009-08-20 14:58 ` [Qemu-devel] [PATCH 1/2] raw-posix: refactor AIO support Christoph Hellwig
2009-08-20 14:58 ` [Qemu-devel] [PATCH 2/2] raw-posix: add Linux native " Christoph Hellwig
2009-08-21  9:53   ` Avi Kivity
2009-08-21 14:48     ` Christoph Hellwig [this message]
2009-08-21 15:35       ` Avi Kivity
2009-08-20 19:06 ` [Qemu-devel] [PATCH 0/2] native Linux AIO support revisited Jamie Lokier
2009-08-21  7:40 ` Avi Kivity
2009-08-21 14:50   ` Christoph Hellwig
2009-08-21 15:38     ` Avi Kivity

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=20090821144852.GA22645@lst.de \
    --to=hch@lst.de \
    --cc=avi@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).