From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49714) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqrRB-00014d-Et for qemu-devel@nongnu.org; Wed, 11 Dec 2013 16:35:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VqrQz-00005B-CE for qemu-devel@nongnu.org; Wed, 11 Dec 2013 16:35:21 -0500 Received: from mail-ee0-x233.google.com ([2a00:1450:4013:c00::233]:53978) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqrQz-0008WA-31 for qemu-devel@nongnu.org; Wed, 11 Dec 2013 16:35:09 -0500 Received: by mail-ee0-f51.google.com with SMTP id b15so3185123eek.38 for ; Wed, 11 Dec 2013 13:35:08 -0800 (PST) Sender: Paolo Bonzini Message-ID: <52A8DA88.3070201@redhat.com> Date: Wed, 11 Dec 2013 22:35:04 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1386764361-15260-1-git-send-email-pbonzini@redhat.com> <1386764361-15260-5-git-send-email-pbonzini@redhat.com> <52A8B436.9030301@redhat.com> In-Reply-To: <52A8B436.9030301@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH 04/14] NUMA: convert -numa option to use OptsVisitor List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: imammedo@redhat.com, gaowanlong@cn.fujitsu.com, qemu-devel@nongnu.org, stefanha@redhat.com Il 11/12/2013 19:51, Eric Blake ha scritto: >> > +{ 'union': 'NumaOptions', >> > + 'data': { >> > + 'node': 'NumaNodeOptions' }} > Why do we need a union, if there's no alternative, and since nothing > else in the series adds an alternative? Because these structures are used to parse command-line options and follow somewhat special rules. The "node" in "-numa node,..." is present for forwards-extensibility. Another alternative, "mem", was added in previous versions of the NUMA policy patches but is made obsolete by Igor's memory object. >> > + >> > +## >> > +# @NumaNodeOptions >> > +# >> > +# Create a guest NUMA node. (for OptsVisitor) >> > +# >> > +# @nodeid: #optional NUMA node ID >> > +# >> > +# @cpus: #optional VCPUs belong to this node > What are the defaults if these fields are omitted? Wanlong, can you fill this out when you resubmit? >> > +# >> > +# @mem: #optional memory size of this node > In bytes? Why is this field a string instead of an integer? It was like this because it is a command-line option and thus is never used via QMP. However, it can and should indeed be a 'size', handled like Igor did for '-m mem=' in patch 8 of the series. Paolo >> > +# >> > +# Since: 2.0 >> > +## >> > +{ 'type': 'NumaNodeOptions', >> > + 'data': { >> > + '*nodeid': 'uint16', >> > + '*cpus': ['uint16'], >> > + '*mem': 'str' }}