aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
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 /arch/s390
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>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/kernel/topology.c12
1 files changed, 11 insertions, 1 deletions
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;