qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/2] raw-posix: add Linux native AIO support


From: Christoph Hellwig
Subject: Re: [Qemu-devel] [PATCH 2/2] raw-posix: add Linux native AIO support
Date: Fri, 21 Aug 2009 16:48:52 +0200
User-agent: Mutt/1.3.28i

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 via email to

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