aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2008-12-25 07:39:23 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2008-12-25 07:39:14 -0500
commit2b1a61f0a8c714c96277bf16a823a84bafa1397d (patch)
treea874b7717e33cb408bfd7edff115e8dba83040c2
parent9fee8db222a344b9ee407fad9c652ed823690788 (diff)
[S390] cpu topology: introduce kernel parameter
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>
-rw-r--r--Documentation/kernel-parameters.txt8
-rw-r--r--arch/s390/kernel/topology.c12
2 files changed, 19 insertions, 1 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index c9115c1b672c..09ede6c90ad7 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -2252,6 +2252,14 @@ and is between 256 and 4096 characters. It is defined in the file
2252 See comment before function dc390_setup() in 2252 See comment before function dc390_setup() in
2253 drivers/scsi/tmscsim.c. 2253 drivers/scsi/tmscsim.c.
2254 2254
2255 topology= [S390]
2256 Format: {off | on}
2257 Specify if the kernel should make use of the cpu
2258 topology informations if the hardware supports these.
2259 The scheduler will make use of these informations and
2260 e.g. base its process migration decisions on it.
2261 Default is off.
2262
2255 tp720= [HW,PS2] 2263 tp720= [HW,PS2]
2256 2264
2257 trix= [HW,OSS] MediaTrix AudioTrix Pro 2265 trix= [HW,OSS] MediaTrix AudioTrix Pro
diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c
index 36faac50e774..71e6f56bfead 100644
--- a/arch/s390/kernel/topology.c
+++ b/arch/s390/kernel/topology.c
@@ -58,6 +58,7 @@ struct core_info {
58 cpumask_t mask; 58 cpumask_t mask;
59}; 59};
60 60
61static int topology_enabled;
61static void topology_work_fn(struct work_struct *work); 62static void topology_work_fn(struct work_struct *work);
62static struct tl_info *tl_info; 63static struct tl_info *tl_info;
63static struct core_info core_info; 64static struct core_info core_info;
@@ -78,7 +79,7 @@ cpumask_t cpu_coregroup_map(unsigned int cpu)
78 cpumask_t mask; 79 cpumask_t mask;
79 80
80 cpus_clear(mask); 81 cpus_clear(mask);
81 if (!machine_has_topology) 82 if (!topology_enabled || !machine_has_topology)
82 return cpu_possible_map; 83 return cpu_possible_map;
83 spin_lock_irqsave(&topology_lock, flags); 84 spin_lock_irqsave(&topology_lock, flags);
84 while (core) { 85 while (core) {
@@ -263,6 +264,15 @@ static void topology_interrupt(__u16 code)
263 schedule_work(&topology_work); 264 schedule_work(&topology_work);
264} 265}
265 266
267static int __init early_parse_topology(char *p)
268{
269 if (strncmp(p, "on", 2))
270 return 0;
271 topology_enabled = 1;
272 return 0;
273}
274early_param("topology", early_parse_topology);
275
266static int __init init_topology_update(void) 276static int __init init_topology_update(void)
267{ 277{
268 int rc; 278 int rc;