Re: [PATCH] kvm tools: Add MMIO coalescing support

Alexander Graf
2011-06-04T15:23:02Z

On 04.06.2011, at 16:46, Ingo Molnar wrote:

>
> * Alexander Graf <agraf@suse.de> wrote:
>
>> So the simple rule is: don't register a coalesced MMIO region for a
>> region where latency matters. [...]
>
> So my first suspicion is confirmed.
>
> A quick look at Qemu sources shows that lots of drivers are using
> coalesced_mmio without being aware of the latency effects and only
> one seems to make use of qemu_flush_coalesced_mmio_buffer(). Drivers
> like hw/e1000.c sure look latency critical to me.

e1000 maps its NVRAM on coalesced mmio - which is completely ok.

> So i maintain my initial opinion: this is a pretty dangerous
> 'optimization' that should be used with extreme care: i can tell it
> you with pretty good authority that latency problems are much more
> easy to introduce than to find and remove ...

Yup, which is why it's very sparsely used in qemu :). Basically, it's only e1000 and vga, both of which are heavily used and tested drivers.

Alex