From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Date: Mon, 10 Nov 2008 15:45:15 +0000 Subject: Re: [patch] remove vcpu_info array v5 Message-Id: <4918570B.4030603@redhat.com> List-Id: References: <4909C00F.8050704@sgi.com> In-Reply-To: <4909C00F.8050704@sgi.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm-ia64@vger.kernel.org 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