From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:42170) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuPTH-0002jO-Cl for qemu-devel@nongnu.org; Thu, 26 Jul 2012 10:55:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SuPTB-0002ZE-KT for qemu-devel@nongnu.org; Thu, 26 Jul 2012 10:55:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52706) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuPTB-0002Z9-Bs for qemu-devel@nongnu.org; Thu, 26 Jul 2012 10:55:17 -0400 Message-ID: <50115A4D.2050303@redhat.com> Date: Thu, 26 Jul 2012 17:55:09 +0300 From: Avi Kivity MIME-Version: 1.0 References: <1342803890-1795-1-git-send-email-ehabkost@redhat.com> <1342803890-1795-3-git-send-email-ehabkost@redhat.com> <20120723122014.GB26120@redhat.com> <20120725184220.GI13029@otherpad.lan.raisama.net> <20120726060840.GQ26120@redhat.com> <20120726141653.GD27859@shell.eng.rdu.redhat.com> In-Reply-To: <20120726141653.GD27859@shell.eng.rdu.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [SeaBIOS PATCH 2/2] allow CPUs to have non-contiguous Local APIC IDs (v2) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: Igor Mammedov , Kevin O'Connor , seabios@seabios.org, qemu-devel@nongnu.org, Gleb Natapov On 07/26/2012 05:16 PM, Eduardo Habkost wrote: >> > >> > It's possible to replace the atomic read of CountCPUs with the bitmap weight >> > calculation on the loop, but: is it really worth it? >> > >> Why not? This eliminates one more global state. > > Maybe we can simply make it stop being global and be used only by the > smp.c initialization code? > > Even if the variable didn't exist yet, I think I would add it myself: > it's simpler and more efficient to calculate the bitmap weight once, > while filling the bitmap, than recalculating it every time on the > while(cmos_smp_count) loop. So you're spinning more efficiently? -- error compiling committee.c: too many arguments to function