From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jes Sorensen Subject: Re: [patch] remove vcpu_info array v5 Date: Mon, 10 Nov 2008 13:30:47 +0100 Message-ID: <49182977.5080105@sgi.com> References: <4909C00F.8050704@sgi.com> <49103812.1070104@redhat.com> <5d6222a80811040555q5be67439sbd38d94dfa25d8ad@mail.gmail.com> <49105C95.90809@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Glauber Costa , Anthony Liguori , Hollis Blanchard , "kvm@vger.kernel.org" , "kvm-ia64@vger.kernel.org" To: Avi Kivity Return-path: Received: from relay1.sgi.com ([192.48.179.29]:47859 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754714AbYKJMlD (ORCPT ); Mon, 10 Nov 2008 07:41:03 -0500 In-Reply-To: <49105C95.90809@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Avi Kivity wrote: > Glauber Costa wrote: >> 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). Well one of the goals with my patch was to get rid of that nasty limit, so that we can scale. Static sized arrays are bad. Jes