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.
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