Received: from eggs.gnu.org ([2001:4830:134:3::10]:55954) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLwDP-0006mn-TJ for qemu-devel@nongnu.org; Thu, 12 Feb 2015 11:02:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YLwDK-0007lo-OE for qemu-devel@nongnu.org; Thu, 12 Feb 2015 11:02:07 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53948) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLwDK-0007lh-Gz for qemu-devel@nongnu.org; Thu, 12 Feb 2015 11:02:02 -0500 Date: Thu, 12 Feb 2015 17:01:54 +0100 From: Igor Mammedov Message-ID: <20150212170154.5a5ef647@nial.brq.redhat.com> In-Reply-To: <20150212152426.GV30651@thinpad.lan.raisama.net> References: <1423511596-2584-1-git-send-email-ehabkost@redhat.com> <1423511596-2584-3-git-send-email-ehabkost@redhat.com> <20150212160149.3adcf821@nial.brq.redhat.com> <20150212152426.GV30651@thinpad.lan.raisama.net> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 2/3] numa: Reject configuration if CPU appears on multiple nodes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: Paolo Bonzini , Hu Tao , qemu-devel@nongnu.org, "Michael S. Tsirkin" On Thu, 12 Feb 2015 13:24:26 -0200 Eduardo Habkost wrote: > On Thu, Feb 12, 2015 at 04:01:49PM +0100, Igor Mammedov wrote: > > On Mon, 9 Feb 2015 17:53:15 -0200 > > Eduardo Habkost wrote: > > > > > Each CPU can appear in only one NUMA node on the NUMA config. Reject > > > configuration if a CPU appears in multiple nodes. > > > > > > Signed-off-by: Eduardo Habkost > > > --- > > > numa.c | 27 +++++++++++++++++++++++++++ > > > 1 file changed, 27 insertions(+) > > > > > > diff --git a/numa.c b/numa.c > > > index f768434..f004a74 100644 > > > --- a/numa.c > > > +++ b/numa.c > > > @@ -167,6 +167,31 @@ error: > > > return -1; > > > } > > > > > > +static void validate_numa_cpus(void) > > > +{ > > > + int i, cpu; > > > + DECLARE_BITMAP(present_cpus, MAX_CPUMASK_BITS); > > naming is a bit confusing, it's not really present CPUs but > > more like possible_cpus > > I meant "present in the NUMA configuration". "Possible" wouldn't > describe it IMO, as it is just tracking the CPUs seen in the config. I > will rename it to "seen_cpus" in the next version. or maybe numa_cpus