Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3960373rdb; Mon, 11 Dec 2023 05:16:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IGMqcwpb7PUs8OdSoTwrCSROdkvqnxMCi0oHjmmk8hEu/5Q5eFy4u7Mn8sgxznIMgBew277 X-Received: by 2002:a05:6a21:7887:b0:191:2c21:8355 with SMTP id bf7-20020a056a21788700b001912c218355mr948590pzc.6.1702300591624; Mon, 11 Dec 2023 05:16:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702300591; cv=none; d=google.com; s=arc-20160816; b=urn8Bzx1Sl0YGZagJcut3nHUhhp3k6o2+kFpWVH/k1mFNuEf6EOGoEv4+cOZNvPXJ5 /iL/JAE6iaip+p6hdC5EdRjlR8MIRk5lBn4aBiQ80JCnQGykisWx8Auq5fSrXRVHU7rN 5jFb1beaQGGcVLqMZJHt5AC/PVkuQcD3brmR4wu1DQcuvlNYpLaHS6otWRT6f18EZ08G fY0LzR96JAY4DMugNcUWyW2Q6l70wOVWTQFmOhDiOrWZt26WUwMnmSej4Jde2UDnPaQC VJV2HM/J5PaPHk6ZkO/U8TbTUJlLUG4hW1L4UwCU4/5AKMCvhUTqhawbk5VhBdYi9A20 Ad0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=9ufhilxA7Ilm0XK+/nBksCKaGbE5P19stEKqZuMPUnw=; fh=HVRJIqdYTwI9UGQPppOOBQUGzHBY4OCJBnwOp+zSWhU=; b=S64G3ko4orc+wl4Q239OjXrfZofB60CSV2MWl64s3Phckm8RdVWxP7S/F7dS8GSp9Y kHW0IBSZ0MDF0yO3kWmCu8UMGGsjiDIXDlkOQbkK/uYWY9qYbztGZ70CwZOWxsb/LBVU 6YGntjAuq+yJhnVrxQaGal5Rf/cuhc7g5ex5qfBRlmYpD0rNvply/QLrPiZvsv/ybz5N UsF6ymnF7JBLgXO1EvvXemHi3yDx5PxKTL7mgbHu/1qBLvCESlp3b9CYeeUX8CooyXwf 0ZxgvGliKDsZU3QHMswsTOVHdHGxjF7laqGLUL5BeoY62rgFgpaYsNL3Ss6W5b9QYGO8 IN2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hwdvHRCC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id 4-20020a631544000000b005b7c45c8acasi5866230pgv.238.2023.12.11.05.16.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 05:16:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hwdvHRCC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id E1795807D6BB; Mon, 11 Dec 2023 05:16:28 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343541AbjLKNQN (ORCPT + 99 others); Mon, 11 Dec 2023 08:16:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234350AbjLKNQM (ORCPT ); Mon, 11 Dec 2023 08:16:12 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA1A8C3 for ; Mon, 11 Dec 2023 05:16:18 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 49330C433C7; Mon, 11 Dec 2023 13:16:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702300578; bh=jXM3Fw++iJ3xzfWAPq/6lRIv6SSxDgbBPkDt8nkAY7g=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hwdvHRCCgKg8zqgQEhB3H8xTCChRrnHZiFQjqdN97d9dUgveWm7OPNz63BOCO5LKE 9OvpGkHFRgqxFnuwT+ZwW690oWUR0KkhV+1xOjk/n+u9UXRMtRHExnTHZDu3MvoZhW RfkoDSbOmKt9qszpRcSmLIMWPM04FzQVn4JdS50Pbm2iACkVKR9x0jLQ4HZB6YD/Tr X78z+D2GpSqf9Cz1Qukwwn401JbRZ/DyrIlV2zJ71XmpVUhAGg0qUiQVdtKJhJruD9 zCjjtAM5qW38Wy2eokHZXYOFftfa38q+j+kxGfdTxxzCtu9ETSjoX1r6KDQLMdGWGG E0VSqQAIm3tWg== Date: Mon, 11 Dec 2023 13:16:12 +0000 From: Will Deacon To: Yicong Yang Cc: catalin.marinas@arm.com, sudeep.holla@arm.com, linux-arm-kernel@lists.infradead.org, dietmar.eggemann@arm.com, gregkh@linuxfoundation.org, rafael@kernel.org, jonathan.cameron@huawei.com, prime.zeng@hisilicon.com, linuxarm@huawei.com, yangyicong@hisilicon.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 0/4] Support SMT control on arm64 Message-ID: <20231211131612.GB25681@willie-the-truck> References: <20231121092602.47792-1-yangyicong@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231121092602.47792-1-yangyicong@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 11 Dec 2023 05:16:29 -0800 (PST) On Tue, Nov 21, 2023 at 05:25:58PM +0800, Yicong Yang wrote: > From: Yicong Yang > > The core CPU control framework supports runtime SMT control which > is not yet supported on arm64. Besides the general vulnerabilities > concerns we want this runtime control on our arm64 server for: > > - better single CPU performance in some cases > - saving overall power consumption > > This patchset implements it in the following aspects: > > - implements the basic support in arch_topology driver > - support retrieve SMT thread number on OF based system > - support retrieve SMT thread number on ACPI based system > - select HOTPLUG_SMT for arm64 > > Tests has been done on our real ACPI based arm64 server and on > ACPI/OF based QEMU VMs. > > The patchset is based on v6.7-rc1. > > Change since v3: > - Fix some build and kconfig error reported by kernel test robot > Link: https://lore.kernel.org/linux-arm-kernel/20231114040110.54590-1-yangyicong@huawei.com/ > > Change since v2: > - Detect SMT thread number at topology build from ACPI/DT, avoid looping CPUs > - Split patches into ACPI/OF/arch_topology path and enable the kconfig for arm64 > Link: https://lore.kernel.org/linux-arm-kernel/20231010115335.13862-1-yangyicong@huawei.com/ > > Yicong Yang (4): > arch_topology: Support basic SMT control for the driver > arch_topology: Support SMT control for OF based system Looking at the first two patches you have here, they are incredibly trivial and feel like they'd be better off implemented as the default behaviour in the core code so that architectures with additional constraints (e.g. x86) can override that. Will