qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH] qemu/pci: optimize pci config handling


From: Michael S. Tsirkin
Subject: [Qemu-devel] Re: [PATCH] qemu/pci: optimize pci config handling
Date: Wed, 7 Oct 2009 21:21:27 +0200
User-agent: Mutt/1.5.19 (2009-01-05)

On Wed, Oct 07, 2009 at 04:24:45PM +0200, Paolo Bonzini wrote:
>> I'm actively trying to get out of range-checking address.
>
> I don't understand what you mean, sorry.
>
>> What you porpose here is certainly more code than we had.
>> So why is this a good idea?
>
> Because it avoids the memcpy/memcmp most of the time (when the memcmp  
> would surely succeed).

Yes :) But at the cost of more code.  I don't think speed
matters there, so less code is good.  But even if it did, extra
read of a single cache line might be cheaper than an extra branch,
and generated code will be more compact.

>  I supposed that would also matter more as the  
> config space size increases---correct me and dismiss the patch if I am  
> mistaken.

No, we'll always only look need to look at the header, whatever the size
of the config space.  That's the point of the patch I posted - future
proof against config space size increases, not optimization.

> Paolo




reply via email to

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