Skip to content

Commit 7e627f8

Browse files
tobias-huschleVasily Gorbik
authored andcommitted
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 <[email protected]> Tested-by: Mete Durlu <[email protected]> Signed-off-by: Tobias Huschle <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
1 parent 9dd333e commit 7e627f8

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

arch/s390/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,14 @@ config SCHED_TOPOLOGY
513513
making when dealing with machines that have multi-threading,
514514
multiple cores or multiple books.
515515

516+
config SCHED_TOPOLOGY_VERTICAL
517+
def_bool y
518+
bool "Use vertical CPU polarization by default"
519+
depends on SCHED_TOPOLOGY
520+
help
521+
Use vertical CPU polarization by default if available.
522+
The default CPU polarization is horizontal.
523+
516524
source "kernel/Kconfig.hz"
517525

518526
config CERT_STORE

arch/s390/kernel/topology.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,8 @@ static int __init topology_init(void)
674674
set_topology_timer();
675675
else
676676
topology_update_polarization_simple();
677+
if (IS_ENABLED(CONFIG_SCHED_TOPOLOGY_VERTICAL))
678+
set_polarization(1);
677679
register_sysctl("s390", topology_ctl_table);
678680

679681
dev_root = bus_get_dev_root(&cpu_subsys);

0 commit comments

Comments
 (0)