From patchwork Mon Feb 13 09:50:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhao Liu X-Patchwork-Id: 13138107 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 87D18C636D7 for ; Mon, 13 Feb 2023 09:51:59 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pRVQj-0003pm-0I; Mon, 13 Feb 2023 04:47:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRVQf-0003iW-CN for qemu-devel@nongnu.org; Mon, 13 Feb 2023 04:47:21 -0500 Received: from mga12.intel.com ([192.55.52.136]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRVQa-0002n2-Nk for qemu-devel@nongnu.org; Mon, 13 Feb 2023 04:47:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676281636; x=1707817636; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=gNTP7tofs2TK91IKiUrDYmJLPEIRl+0PcGF1dFFrCtU=; b=CN2Yp6YH9rB0uvdNM60lLXNWzIRg1hW8fGXb+uCJ0eDxkuPinQzdEqfP 95mpn2pkiu91DZSPzkzIlYzB7IJYbq5eDN3AR0NTrw7/j2wJQmCNoXGDP wfBkIojRutE4RYasUWUCB6/oTc/Nb++spVR+GGXX5LUeQGDgRxdhpBTYg MJQo06dmcev1VOaSozIe9nukh1X/VTEL2hQ0CGdjVrEDHv10dim4SqW7o HUJBUBJpOj/mUCJEppSdBWhdx8zN/dvbt79ptrqIQMWZwnDRe8rYu/pSo f0KpJFwXQIvtms6ugAMYJxsEtp57c84RftYfHvtb9k/+rj50sY0WvgsLx Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10619"; a="310487306" X-IronPort-AV: E=Sophos;i="5.97,293,1669104000"; d="scan'208";a="310487306" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Feb 2023 01:46:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10619"; a="670760697" X-IronPort-AV: E=Sophos;i="5.97,293,1669104000"; d="scan'208";a="670760697" Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.112]) by fmsmga007.fm.intel.com with ESMTP; 13 Feb 2023 01:46:15 -0800 From: Zhao Liu To: Eduardo Habkost , Marcel Apfelbaum , =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= , Yanan Wang , "Michael S . Tsirkin" , Richard Henderson , Paolo Bonzini , Eric Blake , Markus Armbruster Cc: qemu-devel@nongnu.org, Zhenyu Wang , Dapeng Mi , Zhuocheng Ding , Robert Hoo , Sean Christopherson , Like Xu , Zhao Liu Subject: [RFC 50/52] qemu-options: Add the document of hybrid command Date: Mon, 13 Feb 2023 17:50:33 +0800 Message-Id: <20230213095035.158240-51-zhao1.liu@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230213095035.158240-1-zhao1.liu@linux.intel.com> References: <20230213095035.158240-1-zhao1.liu@linux.intel.com> MIME-Version: 1.0 Received-SPF: none client-ip=192.55.52.136; envelope-from=zhao1.liu@linux.intel.com; helo=mga12.intel.com X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Zhao Liu Added the detailed introduction to the four hybrid options with specific examples. Signed-off-by: Zhao Liu --- qemu-options.hx | 77 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/qemu-options.hx b/qemu-options.hx index 8987972a8d5f..2bc7a5ed51ed 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -5611,7 +5611,84 @@ DEF("hybrid", HAS_ARG, QEMU_OPTION_hybrid, "-hybrid cluster,clusters=n" "-hybrid core,cores=n,coretype=core_type[,threads=threads][,clusterid=cluster]", QEMU_ARCH_ALL) +SRST +``-hybrid socket,sockets=n`` + \ +``-hybrid die,dies=n`` + \ +``-hybrid cluster,clusters=n`` + \ +``-hybrid core,cores=n,coretype=core_type[,threads=threads][,clusterid=cluster]`` + Define a hybrid cpu topology. Currently, only i386 PC machine supports this command. + + There're 4 levels need to be configured: socket, die, cluster and core. And the + thread level is included in core level configuration. + + Hybrid and smp cannot be set at the same time. + + As for now, hybrid cpu topology only supports differences between the core and cluster + levels (please note the differences between clusters is caused by containing different + cores), and it assumes threads, dies and sockets are the same. + + These four level options must be written in the order of "socket, die, cluster, core". + + For example, the following options assigns 12 VCPUs which contains 8 Intel Atom cores + and 2 Intel Core cores. + + :: + + -hybrid socket,sockets=1 \ + -hybrid die,dies=1 \ + -hybrid cluster,clusters=4 \ + -hybrid core,cores=1,coretype="core",threads=2,clusterid=0-1 \ + -hybrid core,cores=4,coretype="atom",threads=1,clusterid=2-3 + + '\ ``socket``\ ' option is used to configure how many sockets in the machine. Here + '\ ``sockets``\ ' means the number of sockets in the machine. If this option is not + set, the default is only 1 socket. + + For example: + + :: + + -hybrid socket,sockets=1 + '\ ``die``\ ' option is used to configure how many dies in one socket. Here + '\ ``dies``\ ' means the number of dies in one socket. If this option is not + set, the default is only 1 die per socket. + + For example: + + :: + + -hybrid die,dies=1 + + '\ ``cluster``\ ' option is used to configure how many clusters in one die. Here + '\ ``clusters``\ ' means the number of clusters in one die. If this option is not + set, the default is only 1 cluster per die. + + For example: + + :: + + -hybrid cluster,clusters=1 + + '\ ``core``\ ' option is used to configure hybrid core topology. Here '\ ``cores``\ ' + means the number of current type cores in one cluster. '\ ``coretype``\ ' means the + type of the current core. '\ ``threads``\ ' means how many threads in one current type + core (the default is 1 thread per current core). And '\ ``clusterid``\ ' means the cluster + index list that the current type core belongs to (the default is all clusters have current + type cores). This option cannot be omitted. + + For i386 PC machine, the supported '\ ``coretype``\ ' are "atom" and "core". + + For example (clusters=4): + + :: + + -hybrid core,cores=1,coretype="core",threads=2,clusterid=0-1,clusterid=3 \ + -hybrid core,cores=4,coretype="atom",threads=1,clusterid=2 +ERST HXCOMM This is the last statement. Insert new options before this line!