Re: [patch] remove vcpu_info array v5

Avi Kivity
2008-11-10T15:45:26Z

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