qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <aliguori@us.ibm.com>
To: Jamie Lokier <jamie@shareable.org>
Cc: Ryan Harper <ryanh@us.ibm.com>,
	qemu-devel@nongnu.org, kvm@vger.kernel.org
Subject: Re: [Qemu-devel] Re: [PATCH][RFC] Refactor AIO to allow multiple AIO implementations
Date: Thu, 11 Sep 2008 09:09:02 -0500	[thread overview]
Message-ID: <48C9267E.5050202@us.ibm.com> (raw)
In-Reply-To: <20080911132831.GD16427@shareable.org>

Jamie Lokier wrote:
> I'm under the impression that linux-aio is better in every way, as
> I think Anthony Liguori posted a while back:
>
>   
>>>>  Threads are a poor substitute for a proper AIO interface.
>>>>  linux-aio gives you everything you could possibly want in an
>>>>  interface since it allows you to submit multiple vectored operations
>>>>  in a single syscall, use an fd to signal request completion,
>>>>  complete multiple requests in a single syscall, and inject barriers
>>>>  via fdsync.
>>>>         

Well that Anthony Liguori guy is obviously smoking crack.

The problem with linux-aio is that it doesn't work unless you open a 
file with O_DIRECT.  There is no simple way to make it work with 
buffered files either because of the silliness of the vfs interface.

I know buffered vs. unbuffered IO is a source of contention for some but 
if you're doing largely homogeneous virtualization, and you happen to 
have common storage (either via a common backing file or something more 
sophisticated), buffered IO is going to make a big difference.

There are at least three thread pool implementations in the kernel to 
allow asynchronous IO to buffered files.  If the kernel is doing this 
internally, userspace has no hope of being able to do it differently.

BTW, my current thinking for a thread pool implementation would actually 
use linux-aio in each thread, but using it to emulate preadv/pwritev.

Regards,

Anthony Liguori


> But knowing about request in flight, I/O ordering etc. seem equally
> available via posix-aio on a distro where that calls linux-aio
> (i.e. not the Glibc implementation).
>
> -- Jamie
>   

  reply	other threads:[~2008-09-11 14:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-10 15:49 [Qemu-devel] [PATCH][RFC] Refactor AIO to allow multiple AIO implementations Anthony Liguori
2008-09-11  7:48 ` [Qemu-devel] " Gerd Hoffmann
2008-09-11 12:45   ` Anthony Liguori
2008-09-11 13:15     ` Gerd Hoffmann
2008-09-11 13:28       ` Jamie Lokier
2008-09-11 14:09         ` Anthony Liguori [this message]
2008-09-11 14:04       ` Anthony Liguori

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=48C9267E.5050202@us.ibm.com \
    --to=aliguori@us.ibm.com \
    --cc=jamie@shareable.org \
    --cc=kvm@vger.kernel.org \
    --cc=qemu-devel@nongnu.org \
    --cc=ryanh@us.ibm.com \
    /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).