]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[S390] cpu topology: introduce kernel parameter
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Thu, 25 Dec 2008 12:39:23 +0000 (13:39 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 25 Dec 2008 12:39:14 +0000 (13:39 +0100)
Introduce a topology=[on|off] kernel parameter which allows to switch
cpu topology on/off. Default will be off, since it looks like that for
some workloards this doesn't behave very well (on s390).

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Documentation/kernel-parameters.txt
arch/s390/kernel/topology.c

index c9115c1b672c6e9eadb9ce59c2c198fea024823c..09ede6c90ad71fda3057478ac699908668d4a678 100644 (file)
@@ -2252,6 +2252,14 @@ and is between 256 and 4096 characters. It is defined in the file
                        See comment before function dc390_setup() in
                        drivers/scsi/tmscsim.c.
 
+       topology=       [S390]
+                       Format: {off | on}
+                       Specify if the kernel should make use of the cpu
+                       topology informations if the hardware supports these.
+                       The scheduler will make use of these informations and
+                       e.g. base its process migration decisions on it.
+                       Default is off.
+
        tp720=          [HW,PS2]
 
        trix=           [HW,OSS] MediaTrix AudioTrix Pro
index 36faac50e774e0f6f1700d9da06dc1030bcbe5f5..71e6f56bfead1eda4da895f76c7fc50e586b86a8 100644 (file)
@@ -58,6 +58,7 @@ struct core_info {
        cpumask_t mask;
 };
 
+static int topology_enabled;
 static void topology_work_fn(struct work_struct *work);
 static struct tl_info *tl_info;
 static struct core_info core_info;
@@ -78,7 +79,7 @@ cpumask_t cpu_coregroup_map(unsigned int cpu)
        cpumask_t mask;
 
        cpus_clear(mask);
-       if (!machine_has_topology)
+       if (!topology_enabled || !machine_has_topology)
                return cpu_possible_map;
        spin_lock_irqsave(&topology_lock, flags);
        while (core) {
@@ -263,6 +264,15 @@ static void topology_interrupt(__u16 code)
        schedule_work(&topology_work);
 }
 
+static int __init early_parse_topology(char *p)
+{
+       if (strncmp(p, "on", 2))
+               return 0;
+       topology_enabled = 1;
+       return 0;
+}
+early_param("topology", early_parse_topology);
+
 static int __init init_topology_update(void)
 {
        int rc;