s390/topology: Add config option to switch to vertical during boot

By default, all systems on s390 start in horizontal cpu polarization.
Selecting the new config option SCHED_TOPOLOGY_VERTICAL allows to build
a kernel that switches to vertical polarization during boot.

Acked-by: Heiko Carstens <hca@linux.ibm.com>
Tested-by: Mete Durlu <meted@linux.ibm.com>
Signed-off-by: Tobias Huschle <huschle@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
This commit is contained in:
Tobias Huschle 2024-08-12 13:39:32 +02:00 committed by Vasily Gorbik
parent 9dd333e7af
commit 7e627f8193
2 changed files with 10 additions and 0 deletions

View File

@ -513,6 +513,14 @@ config SCHED_TOPOLOGY
making when dealing with machines that have multi-threading,
multiple cores or multiple books.
config SCHED_TOPOLOGY_VERTICAL
def_bool y
bool "Use vertical CPU polarization by default"
depends on SCHED_TOPOLOGY
help
Use vertical CPU polarization by default if available.
The default CPU polarization is horizontal.
source "kernel/Kconfig.hz"
config CERT_STORE

View File

@ -674,6 +674,8 @@ static int __init topology_init(void)
set_topology_timer();
else
topology_update_polarization_simple();
if (IS_ENABLED(CONFIG_SCHED_TOPOLOGY_VERTICAL))
set_polarization(1);
register_sysctl("s390", topology_ctl_table);
dev_root = bus_get_dev_root(&cpu_subsys);