]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
s390/topology: Add config option to switch to vertical during boot
authorTobias Huschle <huschle@linux.ibm.com>
Mon, 12 Aug 2024 11:39:32 +0000 (13:39 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Thu, 29 Aug 2024 20:56:35 +0000 (22:56 +0200)
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>
arch/s390/Kconfig
arch/s390/kernel/topology.c

index abc7e1cc0e7c31796ab4d4d36b51ef7b13152f8b..2ee634bab222d59d109a964fe44481c159c436dc 100644 (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
index 4bd0ee8eb1ab5d507b2529f1bbbe9e77fa55aafe..58da6d1bae45bcc492214007b18ab16fe42a0097 100644 (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);