Received: from eggs.gnu.org ([2001:4830:134:3::10]:40640) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0VtR-0005i7-47 for qemu-devel@nongnu.org; Fri, 27 Jun 2014 09:08:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X0VtJ-0000tU-I3 for qemu-devel@nongnu.org; Fri, 27 Jun 2014 09:08:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61723) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0VtJ-0000tO-9J for qemu-devel@nongnu.org; Fri, 27 Jun 2014 09:08:33 -0400 Date: Fri, 27 Jun 2014 10:08:22 -0300 From: Eduardo Habkost Message-ID: <20140627130822.GK3222@otherpad.lan.raisama.net> References: <1403818400-13671-1-git-send-email-ehabkost@redhat.com> <1403818400-13671-4-git-send-email-ehabkost@redhat.com> <20140627033359.GB4030@G08FNSTD100614.fnst.cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140627033359.GB4030@G08FNSTD100614.fnst.cn.fujitsu.com> Subject: Re: [Qemu-devel] [PATCH 3/3] numa: Reject configuration if not all node IDs are present List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hu Tao Cc: "Michael S. Tsirkin" , Alexey Kardashevskiy , Nishanth Aravamudan , qemu-devel@nongnu.org, Anton Blanchard , David Rientjes , Igor Mammedov On Fri, Jun 27, 2014 at 11:33:59AM +0800, Hu Tao wrote: > On Thu, Jun 26, 2014 at 06:33:20PM -0300, Eduardo Habkost wrote: > > We don't support sparse NUMA node IDs yet, so this changes QEMU to > > reject configs where not all nodes are present. > > > > Signed-off-by: Eduardo Habkost > > --- > > numa.c | 17 ++++++++++++++++- > > 1 file changed, 16 insertions(+), 1 deletion(-) > > > > diff --git a/numa.c b/numa.c > > index e93407a..96fe5dd 100644 > > --- a/numa.c > > +++ b/numa.c > > @@ -160,9 +160,24 @@ error: > > > > void set_numa_nodes(void) > > { > > + int i; > > + > > + assert(max_numa_nodeid <= MAX_NODES); > > + > > + /* No support for sparse NUMA node IDs yet: */ > > + for (i = max_numa_nodeid - 1; i >= 0; i--) { > > + /* Report large node IDs first, to make mistakes easier to spot */ > > + if (!numa_info[i].present) { > > + error_report("numa: Node ID missing: %d", i); > > + exit(1); > > This reports only one missing node id. Dont' we report all missing ids? I considered that, but then a simple user mistake could make QEMU spit more than 100 lines of error messages. I expect this error code to go away soon, anyway (as soon as we implement sparse node ID support). -- Eduardo