Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp255725rdf; Tue, 21 Nov 2023 01:32:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IFweZu3F0BjUwmre4822sU23bYoLStsgV0V7nVaysKgnbkEAgCgwe2YgyowusJsiWebCwrd X-Received: by 2002:a17:90b:1bca:b0:27d:a105:d9a0 with SMTP id oa10-20020a17090b1bca00b0027da105d9a0mr7663390pjb.12.1700559157722; Tue, 21 Nov 2023 01:32:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700559157; cv=none; d=google.com; s=arc-20160816; b=tafNuQ5m6vwT658pd9nTjaivC3wf1pLjV0BlgeYi2HFj+YW5tZOG8iVQSxYWpa13IU 81HP4XzL/AEWbKe0yuJVoH+tbChn42zA69TqUoLCdHRdbznUdH8ZZKvpy794U2xg2ztz 2y10OE3VC2rJ3hJsc9c59AM7NpPD8ONRA27Fssyh1i1zMb7XhVuIRNLTNpcYtNCg9JId Y4tSbEO9zi5194zsJK9joGvyrCL+NESp7Hv9iAB+w4va+VUUmn0Z++69Qeqcej/DeQc9 x59ZANPkSs98YQZPjZ8kAveBj+Nf32bL4FGLpLLl/rO8EAVI1SwCLhBj+6wKWIgxpMdG 6dwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=u05tRTrc7wi+JIrNwvr+7LfAM1C/UuMkzardZymESdQ=; fh=3iB9MPM7gOV8iaw6nlpksJFY47xoJvfTkJIkOXUlBK4=; b=ROo0CyoIyRM+64L+kG+0lXK0E+TohPLpFeRdjUft+eg8032slwPY1yWgYQoZT+2UP9 5mQYWTHd8Vy8Z0qTt4aGti3bEMgFLANgDKAPEX7Agkc1n2d5ViHyMaiGhvLcVqYDCJbL LG/ET6cnGA6gyI8IBLs0x1UnzLesif8Kqrtejc+YvsKtczlJ6I8ClqmhFigbaH9ATlFy /NX35CV8TyVyTEDcDEI/lvDEVFPq34SAmeegWob6X3dOz3N7cyYa0emAl/nIyLMIyzqt s8Jp+8VN5qp+YpyYfSZ9+bQLDi1HkZvSkVaj64znkop5fi9YX2g7uj0cxp/r4aB38ziW gdqA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id k5-20020a170902c40500b001cad3a744aesi9542734plk.153.2023.11.21.01.32.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 01:32:37 -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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 0FE1F80CE7D7; Tue, 21 Nov 2023 01:30:01 -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 S233573AbjKUJ3i (ORCPT + 99 others); Tue, 21 Nov 2023 04:29:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232229AbjKUJ3c (ORCPT ); Tue, 21 Nov 2023 04:29:32 -0500 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45EEB10E for ; Tue, 21 Nov 2023 01:29:24 -0800 (PST) Received: from canpemm500009.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4SZJr05lYbzRj3v; Tue, 21 Nov 2023 17:25:04 +0800 (CST) Received: from localhost.localdomain (10.50.165.33) by canpemm500009.china.huawei.com (7.192.105.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 21 Nov 2023 17:29:19 +0800 From: Yicong Yang To: , , , CC: , , , , , , , Subject: [PATCH v4 0/4] Support SMT control on arm64 Date: Tue, 21 Nov 2023 17:25:58 +0800 Message-ID: <20231121092602.47792-1-yangyicong@huawei.com> X-Mailer: git-send-email 2.31.0 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.50.165.33] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To canpemm500009.china.huawei.com (7.192.105.203) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, 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]); Tue, 21 Nov 2023 01:30:01 -0800 (PST) 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 arm64: topology: Support SMT control on ACPI based system arm64: Kconfig: Enable HOTPLUG_SMT arch/arm64/Kconfig | 1 + arch/arm64/kernel/topology.c | 23 ++++++++++++++++++ drivers/base/arch_topology.c | 45 +++++++++++++++++++++++++++++++++++ include/linux/arch_topology.h | 14 +++++++++++ 4 files changed, 83 insertions(+) -- 2.24.0