From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55447) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRiTa-0004Ii-Jh for qemu-devel@nongnu.org; Fri, 05 Feb 2016 10:39:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aRiTX-0004z5-Bo for qemu-devel@nongnu.org; Fri, 05 Feb 2016 10:39:14 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48516) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRiTX-0004yw-69 for qemu-devel@nongnu.org; Fri, 05 Feb 2016 10:39:11 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id D9D2BC0AA55B for ; Fri, 5 Feb 2016 15:39:09 +0000 (UTC) Date: Fri, 5 Feb 2016 13:39:07 -0200 From: Eduardo Habkost Message-ID: <20160205153907.GS26314@thinpad.lan.raisama.net> References: <1454586455-10202-1-git-send-email-imammedo@redhat.com> <1454586455-10202-7-git-send-email-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1454586455-10202-7-git-send-email-imammedo@redhat.com> Subject: Re: [Qemu-devel] [PATCH 7/9] pc: acpi: drop not needed intermediate bitmap cpu->found_cpus List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, mst@redhat.com On Thu, Feb 04, 2016 at 12:47:33PM +0100, Igor Mammedov wrote: > cpu->found_cpus bitmap is used for setting present > flag in CPON AML package at start up. But it takes > a bunch of code to fill bitmap and cloud be simplified > by calling qemu_get_cpu_by_arch_id(apic_id) directly. > > Hence do so and remove not used anymore bitmap > with related utilities, which saves us ~32LOC > and also would simplify consolidating APCI parts > of CPU hotplug. > > Signed-off-by: Igor Mammedov This makes the code loops through all smp_cpus CPUs max_cpus times, instead of just looping through the smp_cpus CPUs once. I'm all for making the code simpler, and there's an upper bound: looking at CPU objects 64k times (because MAX_CPUMASK_BITS is 255). But I want to make sure we agree this is an optimization we want to drop. -- Eduardo