Re: [patch] remove vcpu_info array v5

Avi Kivity <[email protected]>
Newsgroups org.kernel.vger.kvm-ia64,org.kernel.vger.kvm
Message-ID <[email protected]>
Anthony Liguori wrote:
>
> Just do a linear search of the CPUState list and be done with it.  
> This smells of premature optimization greatly.  I would be amazed if 
> walking the CPUState list is ever on the fast path or will ever be.  
> Really, if you need to go from cpu_index => CPUState, it suggests 
> you're doing something wrong.
>

apic_bus_deliver() in hw/apic.c (it uses a static array of local apics, 
but under you proposal it would need to be converted to a list as well).

happens once per interrupt.  With external interrupts you might 
precompute it, but IPIs definitely need fast int->ptr conversion.

-- 
error compiling committee.c: too many arguments to function
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.