From nobody Tue May 7 08:14:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1488546929831912.1514743360841; Fri, 3 Mar 2017 05:15:29 -0800 (PST) Received: from localhost ([::1]:58016 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cjn3Q-0005BN-KK for importer@patchew.org; Fri, 03 Mar 2017 08:15:28 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55274) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cjn1S-00047J-Hp for qemu-devel@nongnu.org; Fri, 03 Mar 2017 08:13:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cjn1R-0008Pe-Bh for qemu-devel@nongnu.org; Fri, 03 Mar 2017 08:13:26 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50012) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cjn1R-0008P5-5Y for qemu-devel@nongnu.org; Fri, 03 Mar 2017 08:13:25 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 616F281245; Fri, 3 Mar 2017 13:13:25 +0000 (UTC) Received: from localhost (ovpn-116-33.gru2.redhat.com [10.97.116.33]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v23DDOvb017136; Fri, 3 Mar 2017 08:13:24 -0500 From: Eduardo Habkost To: Peter Maydell Date: Fri, 3 Mar 2017 10:13:17 -0300 Message-Id: <20170303131317.23617-2-ehabkost@redhat.com> In-Reply-To: <20170303131317.23617-1-ehabkost@redhat.com> References: <20170303131317.23617-1-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 03 Mar 2017 13:13:25 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 1/1] qemu-options: Rewrite -numa documentation X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Igor Mammedov , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Rewrite the -numa documentation to clarify what exactly it does. Signed-off-by: Eduardo Habkost Message-Id: <20170123180632.28942-3-ehabkost@redhat.com> Reviewed-by: Igor Mammedov Signed-off-by: Eduardo Habkost --- qemu-options.hx | 38 ++++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index c85f77d1d8..229243831b 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -144,16 +144,34 @@ STEXI @item -numa node[,mem=3D@var{size}][,cpus=3D@var{firstcpu}[-@var{lastcpu}]= ][,nodeid=3D@var{node}] @itemx -numa node[,memdev=3D@var{id}][,cpus=3D@var{firstcpu}[-@var{lastcpu= }]][,nodeid=3D@var{node}] @findex -numa -Simulate a multi node NUMA system. If @samp{mem}, @samp{memdev} -and @samp{cpus} are omitted, resources are split equally. Also, note -that the -@option{numa} option doesn't allocate any of the specified -resources. That is, it just assigns existing resources to NUMA nodes. This -means that one still has to use the @option{-m}, @option{-smp} options -to allocate RAM and VCPUs respectively, and possibly @option{-object} -to specify the memory backend for the @samp{memdev} suboption. - -@samp{mem} and @samp{memdev} are mutually exclusive. Furthermore, if one -node uses @samp{memdev}, all of them have to use it. +Define a NUMA node and assign RAM and VCPUs to it. + +@var{firstcpu} and @var{lastcpu} are CPU indexes. Each +@samp{cpus} option represent a contiguous range of CPU indexes +(or a single VCPU if @var{lastcpu} is omitted). A non-contiguous +set of VCPUs can be represented by providing multiple @samp{cpus} +options. If @samp{cpus} is omitted on all nodes, VCPUs are automatically +split between them. + +For example, the following option assigns VCPUs 0, 1, 2 and 5 to +a NUMA node: +@example +-numa node,cpus=3D0-2,cpus=3D5 +@end example + +@samp{mem} assigns a given RAM amount to a node. @samp{memdev} +assigns RAM from a given memory backend device to a node. If +@samp{mem} and @samp{memdev} are omitted in all nodes, RAM is +split equally between them. + +@samp{mem} and @samp{memdev} are mutually exclusive. Furthermore, +if one node uses @samp{memdev}, all of them have to use it. + +Note that the -@option{numa} option doesn't allocate any of the +specified resources, it just assigns existing resources to NUMA +nodes. This means that one still has to use the @option{-m}, +@option{-smp} options to allocate RAM and VCPUs respectively. + ETEXI =20 DEF("add-fd", HAS_ARG, QEMU_OPTION_add_fd, --=20 2.11.0.259.g40922b1