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: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH 2/2 v2] Direct IDE I/O
Date: Mon, 03 Dec 2007 12:06:00 -0600
User-agent: Thunderbird 2.0.0.6 (X11/20071022)

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








reply via email to

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