Re: [ANNOUNCE] kvm-14 release

Laurent Vivier
2007-02-28T14:12:22Z

[-- Attachment #1.1: Type: text/plain, Size: 3921 bytes --]

Anthony Liguori wrote:
> Avi Kivity wrote:
>> Anthony Liguori wrote:
>>> Avi Kivity wrote:
>>>> Laurent Vivier wrote:
>>>>> There are remaining issues : libposix-aio uses kernel AIO, so files
>>>>> must be
>>>>> opened using O_DIRECT and buffers must be aligned. libposix-aio is
>>>>> able to
>>>>> manage other cases but this has a performance cost.
>>>>>
>>>>>
>>>> Because the guest is also doing dma, the buffers are expected to be
>>>> aligned (it might be different if using pio, but unlikely).
>>> The IDE emulation always uses a temporary buffer. This is partially
>>> because you cannot always rely on being able to use an offset on
>>> phys_ram_base (when doing user only emulation).
>> Why is that?
>
> Well, user won't do IDE emulation, but cpu_physical_memory_rw has to
> jump through more hoops for IDE.
>
> What's more relevant though, is it's possible for the guest to setup DMA
> to device memory, in which case, you need to route the IO to callbacks.
> That's pretty unlikely though so I think we can stream line it so that
> we maintain correctness while also getting less copies.

I'm not sure I had understood correctly your explanation, but I tried to remove
buffer from IDE device. I made a (pseudo-)benchmark with "dd"

Applied patch is here:

http://www.bullopensource.org/posix/qemu/ide-directio.diff

(pseudo-)Benchmark is here:

kvm-14

dd if=/dev/hda of=/dev/null count=100000
51200000 bytes transferred in 4.735706 seconds (10811482 bytes/sec)
dd if=/dev/hda of=/dev/null count=1000000
512000000 bytes transferred in 25.218732 seconds (20302369 bytes/sec)

kvm-14 + libposix-aio

dd if=/dev/hda of=/dev/null count=100000
51200000 bytes transferred in 3.335737 seconds (15348932 bytes/sec)
dd if=/dev/hda of=/dev/null count=1000000
512000000 bytes transferred in 19.242217 seconds (26608161 bytes/sec)

kvm-14 + libposix-aio + ide-directio

dd if=/dev/hda of=/dev/null count=100000
51200000 bytes transferred in 2.695296 seconds (18996058 bytes/sec)
dd if=/dev/hda of=/dev/null count=1000000
512000000 bytes transferred in 14.992513 seconds (34150379 bytes/sec)

qemu-0.9.0

dd if=/dev/hda of=/dev/null count=100000
1200000 bytes transferred in 2.694546 seconds (19001345 bytes/sec)
dd if=/dev/hda of=/dev/null count=1000000
512000000 bytes transferred in 25.524641 seconds (20059048 bytes/sec)

qemu-0.9.0 + libposix-aio

dd if=/dev/hda of=/dev/null count=100000
51200000 bytes transferred in 2.859584 seconds (17904702 bytes/sec)
dd if=/dev/hda of=/dev/null count=1000000
512000000 bytes transferred in 25.045071 seconds (20443144 bytes/sec)

qemu-0.9.0 + libposix-aio + ide-directio

dd if=/dev/hda of=/dev/null count=100000
51200000 bytes transferred in 2.897503 seconds (17670387 bytes/sec)
dd if=/dev/hda of=/dev/null count=1000000
512000000 bytes transferred in 25.900654 seconds (19767841 bytes/sec)

qemu-0.9.0 + kqemu

dd if=/dev/hda of=/dev/null count=100000
51200000 bytes transferred in 6.204987 seconds (8251427 bytes/sec)
dd if=/dev/hda of=/dev/null count=1000000
512000000 bytes transferred in 65.149972 seconds (7858791 bytes/sec)

qemu-0.9.0 + kqemu + libposix-aio

dd if=/dev/hda of=/dev/null count=100000
51200000 bytes transferred in 6.075537 seconds (8427239 bytes/sec)
dd if=/dev/hda of=/dev/null count=1000000
512000000 bytes transferred in 57.506392 seconds (8903358 bytes/sec)

qemu-0.9.0 + kqemu + libposix-aio + ide-directio

dd if=/dev/hda of=/dev/null count=100000
51200000 bytes transferred in 6.083927 seconds (8415617 bytes/sec)
dd if=/dev/hda of=/dev/null count=1000000
512000000 bytes transferred in 57.602499 seconds (8888503 bytes/sec)

Regards,
Laurent
--
------------- Laurent.Vivier-6ktuUTfB/bM@public.gmane.org --------------
"Any sufficiently advanced technology is
indistinguishable from magic." - Arthur C. Clarke

[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 345 bytes --]

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

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

_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org