From mboxrd@z Thu Jan 1 00:00:00 1970 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EFA7FC433FE for ; Tue, 28 Sep 2021 11:48:18 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 8CDEE61157 for ; Tue, 28 Sep 2021 11:48:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8CDEE61157 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:53332 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mVBar-0007XQ-Mx for qemu-devel@archiver.kernel.org; Tue, 28 Sep 2021 07:48:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48550) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVBVL-0002Pi-8B; Tue, 28 Sep 2021 07:42:35 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:3141) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVBVI-0002Da-JP; Tue, 28 Sep 2021 07:42:34 -0400 Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4HJcv138rkz8yvD; Tue, 28 Sep 2021 19:37:49 +0800 (CST) Received: from dggpemm500023.china.huawei.com (7.185.36.83) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Tue, 28 Sep 2021 19:42:25 +0800 Received: from [10.174.187.128] (10.174.187.128) by dggpemm500023.china.huawei.com (7.185.36.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2308.8; Tue, 28 Sep 2021 19:42:25 +0800 Subject: Re: [PATCH 2/2] qemu-options: Add missing "sockets=2" to CLI "-smp 2" To: =?UTF-8?Q?Daniel_P=2e_Berrang=c3=a9?= References: <20210928093157.14620-1-wangyanan55@huawei.com> <20210928093157.14620-3-wangyanan55@huawei.com> <9728083c-059c-3990-f651-3fbdce86491c@redhat.com> <0508934a-f4d5-a7ed-310a-065aa823fb08@huawei.com> From: "wangyanan (Y)" Message-ID: Date: Tue, 28 Sep 2021 19:42:24 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Originating-IP: [10.174.187.128] X-ClientProxiedBy: dggeme709-chm.china.huawei.com (10.1.199.105) To dggpemm500023.china.huawei.com (7.185.36.83) X-CFilter-Loop: Reflected Received-SPF: pass client-ip=45.249.212.188; envelope-from=wangyanan55@huawei.com; helo=szxga02-in.huawei.com X-Spam_score_int: -67 X-Spam_score: -6.8 X-Spam_bar: ------ X-Spam_report: (-6.8 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-2.562, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jones , qemu-trivial@nongnu.org, qemu-devel@nongnu.org, Laurent Vivier , wanghaibin.wang@huawei.com, =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 2021/9/28 19:01, Daniel P. Berrangé wrote: > On Tue, Sep 28, 2021 at 06:58:20PM +0800, wangyanan (Y) wrote: >> On 2021/9/28 18:46, Philippe Mathieu-Daudé wrote: >>> On 9/28/21 11:31, Yanan Wang wrote: >>>> There is one example of -smp CLI in qemu-options.hx currently >>>> using "-smp 2" and assuming that there will be 2 sockets. >>>> However now the actually calculation logic of missing sockets >>>> and cores is not immutable, we should use more explicit CLIs >>>> like "-smp 2,sockets=2" if we want multiple sockets. >>>> >>>> Signed-off-by: Yanan Wang >>>> --- >>>> qemu-options.hx | 2 +- >>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>> >>>> diff --git a/qemu-options.hx b/qemu-options.hx >>>> index dcd9595650..ff8917c5e1 100644 >>>> --- a/qemu-options.hx >>>> +++ b/qemu-options.hx >>>> @@ -395,7 +395,7 @@ SRST >>>> -m 2G \ >>>> -object memory-backend-ram,size=1G,id=m0 \ >>>> -object memory-backend-ram,size=1G,id=m1 \ >>>> - -smp 2 \ >>>> + -smp 2,sockets=2,maxcpus=2 \ >>> Is the addition of "maxcpus=2" intentional? >> Yes, but it's not necessary IMO. I just wanted to keep consistency >> with other numa config examples in the Doc. Should I remove it ? > I think it makes sense to be explicit, because the numa config > works in terms of maxcpus when splitting cpus between nodes The statement of this numa config example actually assume that there will be 2 cpus totally. Although based on behavior of the smp parser we will get maxcpus=2, I also tend to keep it explicitly. But I should update subject of this patch and the commit message. Thanks, Yanan