From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [patch] remove vcpu_info array v5 Date: Tue, 04 Nov 2008 16:40:24 +0200 Message-ID: <49105ED8.107@redhat.com> References: <4909C00F.8050704@sgi.com> <49103812.1070104@redhat.com> <5d6222a80811040555q5be67439sbd38d94dfa25d8ad@mail.gmail.com> <49105C95.90809@redhat.com> <5d6222a80811040635j70c57efev1f3abc5096803b29@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Jes Sorensen , Anthony Liguori , Hollis Blanchard , "kvm@vger.kernel.org" , "kvm-ia64@vger.kernel.org" To: Glauber Costa Return-path: Received: from mx2.redhat.com ([66.187.237.31]:44122 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754102AbYKDOkd (ORCPT ); Tue, 4 Nov 2008 09:40:33 -0500 In-Reply-To: <5d6222a80811040635j70c57efev1f3abc5096803b29@mail.gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: Glauber Costa wrote: >> 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). >> > > Yes, but I believe the whole point of jes patches is to remove those limits. > So we could linear search huge lists? Or code hashes where arrays would do? No, sir. An array of pointers statically sized at MAX_CPUS is fine. If you insist, you can realloc() it on demand. -- error compiling committee.c: too many arguments to function