qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/2 v2] Direct IDE I/O


From: Laurent Vivier
Subject: Re: [Qemu-devel] [PATCH 2/2 v2] Direct IDE I/O
Date: Mon, 03 Dec 2007 20:10:44 +0100

Le lundi 03 décembre 2007 à 12:06 -0600, Anthony Liguori a écrit :
> Samuel Thibault wrote:
> > Anthony Liguori, le Mon 03 Dec 2007 09:54:47 -0600, a écrit :
> >   
> >> Have you done any performance testing?  Buffered IO should absolutely 
> >> beat direct IO simply because buffered IO allows writes to complete 
> >> before they actually hit disk.
> >>     
> >
> > Since qemu can use the aio interface, that shouldn't matter.
> >   
> 
> Well, let's separate a few things.  QEMU uses posix-aio which uses 
> threads and normal read/write operations.  It also limits the number of 
> threads that aio uses to 1 which effectively makes everything 
> synchronous anyway.

Yes, librt is providing posix-aio, and librt coming with GNU libc uses
threads.
But if I remember correctly librt coming with RHEL uses a mix of threads
and linux kernel AIO (you can have a look to the .srpm of libc).

There is also the libaio I wrote some years ago (with Sébastien Dugué)
which is purely linux kernel AIO (but kernel patches were never included
because of Zach Brown Asynchronous System Call work)

BTW, if everyone thinks it could be a good idea I can port block-raw.c
to use linux kernel AIO (without removing POSIX AIO support, of course)

> But it still doesn't matter.  When you issue a write() on an O_DIRECT 
> fd, the write does not complete until the data has made it's way to 
> disk.  The guest can still run if you're using O_NONBLOCK but the IDE 
> device will not submit another IO request until you complete the DMA 
> operation.
> 
> The SCSI device supports multiple outstanding operations but it's 
> limited to 16 but you'll never see more than one request at a time in 
> QEMU currently because of the limitation to a single thread.
> 
> Regards,
> 
> Anthony Liguori
> 
> > Samuel
> >
> >
> >
> >   
> 
> 
> 
-- 
------------- address@hidden  --------------
       "Any sufficiently advanced technology is
  indistinguishable from magic." - Arthur C. Clarke

Attachment: signature.asc
Description: Ceci est une partie de message numériquement signée


reply via email to

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