Sign in
Sign up
Explore
Enterprise
Education
Search
Help
Terms of use
About Us
Explore
Enterprise
Education
Gitee Premium
Gitee AI
AI teammates
Sign in
Sign up
Fetch the repository succeeded.
description of repo status
Open Source
>
Other
>
Operation System
&&
Donate
Please sign in before you donate.
Cancel
Sign in
Scan WeChat QR to Pay
Cancel
Complete
Prompt
Switch to Alipay.
OK
Cancel
Watch
Unwatch
Watching
Releases Only
Ignoring
458
Star
1.7K
Fork
1.9K
GVP
openEuler
/
kernel
Closed
Code
Issues
1271
Pull Requests
991
Wiki
Insights
Pipelines
Service
Quality Analysis
Jenkins for Gitee
Tencent CloudBase
Tencent Cloud Serverless
悬镜安全
Aliyun SAE
Codeblitz
SBOM
DevLens
Don’t show this again
Update failed. Please try again later!
Remove this flag
Content Risk Flag
This task is identified by
as the content contains sensitive information such as code security bugs, privacy leaks, etc., so it is only accessible to contributors of this repository.
【OLK-6.6】drivers: arch_topology: Support SMT control
Done
#IBZQQR
内核需求
linhongye
Opened this issue
2025-04-09 15:25
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 ACPI based arm64 server and on ACPI/OF based QEMU VMs. v12: Link: https://lore.kernel.org/linux-arm-kernel/20250311075143.61078-1-yangyicong@huawei.com/ Change since v11: - Remove the check and warning for heterogeneous platform as suggested and discussed - refine comments/commit according to Dietmar Link: https://lore.kernel.org/linux-arm-kernel/20250218141018.18082-1-yangyicong@huawei.com/ Change since v10: - handle topology parsing failure case on DT based system - address some style comments per Jonathan and add tags, Thanks Link: https://lore.kernel.org/linux-arm-kernel/20241220075313.51502-1-yangyicong@huawei.com/ Change since v9: - Refine the comment of topology_is_primary_thread(). Tested with LoongArch to prove it also works on architecture's not using CONFIG_GENERIC_ARCH_TOPOLOGY - always call cpu_smt_set_num_threads() to make the smt/control shows correct status on non-SMT system Link: https://lore.kernel.org/linux-arm-kernel/20241114141127.23232-1-yangyicong@huawei.com/ Change since v8: - Fix WARN on ACPI based non-SMT platform noticed in v7, per Pierre. Link: https://lore.kernel.org/all/20241105093237.63565-1-yangyicong@huawei.com/ Change since v7: Address the comments from Thomas: - Add a newline between the glue define and function of topology_is_primary_thread - Explicitly mention the sibling mask won't be empty in the comment Link: https://lore.kernel.org/lkml/20241030125415.18994-1-yangyicong@huawei.com/ Change since v6: - Fix unused variable if !CONFIG_ARM64 || !CONFIG_RISV found by lkp-test - Fix max_smt_thread_num updating in OF path pointed by Pierre - Drop unused variable and refine the comments/commit per Pierre Link: https://lore.kernel.org/linux-arm-kernel/20241015021841.35713-1-yangyicong@huawei.com/ Change since v5: - Drop the dependency on CONFIG_SMP since it's always on arm64, per Pierre - Avoid potential multiple calls of cpu_smt_set_num_threads() on asymmetric system, per Dietmar - Detect heterogeneous SMT topology and issue a warning for partly support, per Pierre - Thanks Dietmar for testing, didn't pickup the tag due to code changes. Thanks testing by Pierre Link: https://lore.kernel.org/linux-arm-kernel/20240806085320.63514-1-yangyicong@huawei.com/ 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 <lkp@intel.com> 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 | 54 +++++++++++++++++++++++++++++ arch/powerpc/include/asm/topology.h | 1 + arch/x86/include/asm/topology.h | 2 +- drivers/base/arch_topology.c | 18 ++++++++++ include/linux/topology.h | 24 +++++++++++++ 6 files changed, 99 insertions(+), 1 deletion(-) -- 2.24.0 driver inclusion from mainline-v6.10-rc2 category: feature bugzilla:https://gitee.com/openeuler/kernel/issues/IBZQQR
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 ACPI based arm64 server and on ACPI/OF based QEMU VMs. v12: Link: https://lore.kernel.org/linux-arm-kernel/20250311075143.61078-1-yangyicong@huawei.com/ Change since v11: - Remove the check and warning for heterogeneous platform as suggested and discussed - refine comments/commit according to Dietmar Link: https://lore.kernel.org/linux-arm-kernel/20250218141018.18082-1-yangyicong@huawei.com/ Change since v10: - handle topology parsing failure case on DT based system - address some style comments per Jonathan and add tags, Thanks Link: https://lore.kernel.org/linux-arm-kernel/20241220075313.51502-1-yangyicong@huawei.com/ Change since v9: - Refine the comment of topology_is_primary_thread(). Tested with LoongArch to prove it also works on architecture's not using CONFIG_GENERIC_ARCH_TOPOLOGY - always call cpu_smt_set_num_threads() to make the smt/control shows correct status on non-SMT system Link: https://lore.kernel.org/linux-arm-kernel/20241114141127.23232-1-yangyicong@huawei.com/ Change since v8: - Fix WARN on ACPI based non-SMT platform noticed in v7, per Pierre. Link: https://lore.kernel.org/all/20241105093237.63565-1-yangyicong@huawei.com/ Change since v7: Address the comments from Thomas: - Add a newline between the glue define and function of topology_is_primary_thread - Explicitly mention the sibling mask won't be empty in the comment Link: https://lore.kernel.org/lkml/20241030125415.18994-1-yangyicong@huawei.com/ Change since v6: - Fix unused variable if !CONFIG_ARM64 || !CONFIG_RISV found by lkp-test - Fix max_smt_thread_num updating in OF path pointed by Pierre - Drop unused variable and refine the comments/commit per Pierre Link: https://lore.kernel.org/linux-arm-kernel/20241015021841.35713-1-yangyicong@huawei.com/ Change since v5: - Drop the dependency on CONFIG_SMP since it's always on arm64, per Pierre - Avoid potential multiple calls of cpu_smt_set_num_threads() on asymmetric system, per Dietmar - Detect heterogeneous SMT topology and issue a warning for partly support, per Pierre - Thanks Dietmar for testing, didn't pickup the tag due to code changes. Thanks testing by Pierre Link: https://lore.kernel.org/linux-arm-kernel/20240806085320.63514-1-yangyicong@huawei.com/ 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 <lkp@intel.com> 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 | 54 +++++++++++++++++++++++++++++ arch/powerpc/include/asm/topology.h | 1 + arch/x86/include/asm/topology.h | 2 +- drivers/base/arch_topology.c | 18 ++++++++++ include/linux/topology.h | 24 +++++++++++++ 6 files changed, 99 insertions(+), 1 deletion(-) -- 2.24.0 driver inclusion from mainline-v6.10-rc2 category: feature bugzilla:https://gitee.com/openeuler/kernel/issues/IBZQQR
Comments (
1
)
Sign in
to comment
Status
Done
新建
已接纳
In Development
拟拒绝
Canceled
Declined
Done
Assignees
Not set
Labels
sig/Kernel
Not set
Projects
Unprojected
Unprojected
Milestones
No related milestones
No related milestones
Pull Requests
None yet
None yet
Successfully merging a pull request will close this issue.
Branches
No related branch
Branches (
-
)
Tags (
-
)
Planed to start   -   Planed to end
-
Top level
Not Top
Top Level: High
Top Level: Medium
Top Level: Low
Priority
Not specified
Serious
Main
Secondary
Unimportant
Duration
(hours)
参与者(2)
C
1
https://gitee.com/openeuler/kernel.git
git@gitee.com:openeuler/kernel.git
openeuler
kernel
kernel
Going to Help Center
Search
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
Comment
Repository Report
Back to the top
Login prompt
This operation requires login to the code cloud account. Please log in before operating.
Go to login
No account. Register