From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2B3231BD4F0 for ; Tue, 6 Aug 2024 08:59:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.188 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722934777; cv=none; b=geBOTZ1/2T6369o8/JTA73+QdF7ZPMSNREFeSLdRiJxOCVkOg8ti5Ts+pCwsjrCDHprpw4BbbekUqDSBeZ4NKzmwhXAO8fJaaJuq3z76b60Slv2VGQ4d+pocdE+eB9613CLjeGDlYypGy7nEYTUAWe++JWStJsSPr+0rt9kAys4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722934777; c=relaxed/simple; bh=KedQPHi61sunIvXTAZ1469/WC6/J0bl3HAWAtlkMVgk=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=OIc60tEzRgn7w4UK/0U6wcTRdDUwaoZ/BTRC0aS5ccjVdqjfEWlOq+QnJc0Xh8xyY4zPg+3iUvEnH2HWrjJH02KjmHY3yRODcM3Swf2yqMbn3jNuLH/TS7zDgOPBduYUjLwdLy/5KgTrX4FzexVvzp8DBuuti2d/cuC1FRCh6V4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.188 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.105]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4WdRyn2YkRzfZkB; Tue, 6 Aug 2024 16:57:37 +0800 (CST) Received: from kwepemd200014.china.huawei.com (unknown [7.221.188.8]) by mail.maildlp.com (Postfix) with ESMTPS id AA8EA14011B; Tue, 6 Aug 2024 16:59:30 +0800 (CST) Received: from localhost.localdomain (10.50.165.33) by kwepemd200014.china.huawei.com (7.221.188.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.34; Tue, 6 Aug 2024 16:59:29 +0800 From: Yicong Yang To: , , , , , , , , , CC: , , , , , , , , , , , Subject: [PATCH v5 0/4] Support SMT control on arm64 Date: Tue, 6 Aug 2024 16:53:16 +0800 Message-ID: <20240806085320.63514-1-yangyicong@huawei.com> X-Mailer: git-send-email 2.31.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemd200014.china.huawei.com (7.221.188.8) 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: - Provides a default topology_is_primary_thread() - 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. Change since v4: - Provide a default topology_is_primary_thread() in the framework, Per Will Link: https://lore.kernel.org/linux-arm-kernel/20231121092602.47792-1-yangyicong@huawei.com/ 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): cpu/SMT: Provide a default topology_is_primary_thread() 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 | 24 ++++++++++++++++++++++++ arch/powerpc/include/asm/topology.h | 1 + arch/x86/include/asm/topology.h | 2 +- drivers/base/arch_topology.c | 13 +++++++++++++ include/linux/topology.h | 14 ++++++++++++++ 6 files changed, 54 insertions(+), 1 deletion(-) -- 2.24.0