public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC] Multiple QEMU AIO implementations
@ 2008-04-16 21:36 Anthony Liguori
  2008-04-16 23:52 ` Marcelo Tosatti
  0 siblings, 1 reply; 2+ messages in thread
From: Anthony Liguori @ 2008-04-16 21:36 UTC (permalink / raw)
  To: Marcelo Tosatti, Avi Kivity, kvm-devel

[-- Attachment #1: Type: text/plain, Size: 745 bytes --]

This isn't fully cooked yet, but pretty close.  The basic idea is to 
make the aio usage in block-raw go to a set of function pointers and 
allow multiple simultaneous AIO implementations.

I converted the posix-aio support to this, and also introduced a "unix" 
aio which just uses O_NONBLOCK and select().  The later only supports 1 
simultaneous request per-fd but currently posix-aio is limited to that 
too.  At least with my QEMU testing, the unix aio implementation 
outperforms posix-aio by a factor of 2.

And it uses no signals...

I'm inclined to suggest that we use signalfd with posix-aio, and for 
older guests, just fall back to unix aio.  We can also introduce a 
linux-aio and use that when possible.

Regards,

Anthony Liguori

[-- Attachment #2: qemu-block-aio-unix.patch --]
[-- Type: application/mbox, Size: 27260 bytes --]

[-- Attachment #3: Type: text/plain, Size: 320 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

[-- Attachment #4: Type: text/plain, Size: 158 bytes --]

_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [RFC] Multiple QEMU AIO implementations
  2008-04-16 21:36 [RFC] Multiple QEMU AIO implementations Anthony Liguori
@ 2008-04-16 23:52 ` Marcelo Tosatti
  0 siblings, 0 replies; 2+ messages in thread
From: Marcelo Tosatti @ 2008-04-16 23:52 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: Marcelo Tosatti, kvm-devel, Avi Kivity

On Wed, Apr 16, 2008 at 04:36:42PM -0500, Anthony Liguori wrote:
> This isn't fully cooked yet, but pretty close.  The basic idea is to 
> make the aio usage in block-raw go to a set of function pointers and 
> allow multiple simultaneous AIO implementations.

The AIO API looks great. Looking forward to a linux-aio backend.

> I converted the posix-aio support to this, and also introduced a "unix" 
> aio which just uses O_NONBLOCK and select().  The later only supports 1 
> simultaneous request per-fd but currently posix-aio is limited to that 
> too.  At least with my QEMU testing, the unix aio implementation 
> outperforms posix-aio by a factor of 2.

Unfortunately O_NONBLOCK is not honoured for block backed storage,
so its a no-go.

> And it uses no signals...
> 
> I'm inclined to suggest that we use signalfd with posix-aio, and for 
> older guests, just fall back to unix aio.  We can also introduce a 
> linux-aio and use that when possible.

I think Avi's suggestion to emulate signalfd with a separate thread
which does sigtimedwait+write-to-a-pipe is sensate.


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-04-16 23:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-16 21:36 [RFC] Multiple QEMU AIO implementations Anthony Liguori
2008-04-16 23:52 ` Marcelo Tosatti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox