From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Date: Tue, 04 Nov 2008 14:30:45 +0000 Subject: Re: [patch] remove vcpu_info array v5 Message-Id: <49105C95.90809@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 Glauber Costa wrote: >> This can't be the best way of determining the env pointer from a cpu number. >> > By far it is not. But at least it does not depend on any kvm-specific > data, and works > for both qemu and kvm. So it's better to be this way. > > If we change this scheme to a better one, like a hash table, then > it'll improve both qemu and kvm. > > There are simpler data structures. An example is an array. Since we have an upper limit on the number of cpus (->max_cpus) there are no issues with scaling (unlike with the algorithm above). -- error compiling committee.c: too many arguments to function