Commit 2b1a61f0a8c714c96277bf16a823a84bafa1397d

Authored by Heiko Carstens
Committed by Martin Schwidefsky
1 parent 9fee8db222

[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>

Showing 2 changed files with 19 additions and 1 deletions Side-by-side Diff

Documentation/kernel-parameters.txt
... ... @@ -2252,6 +2252,14 @@
2252 2252 See comment before function dc390_setup() in
2253 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 2263 tp720= [HW,PS2]
2256 2264  
2257 2265 trix= [HW,OSS] MediaTrix AudioTrix Pro
arch/s390/kernel/topology.c
... ... @@ -58,6 +58,7 @@
58 58 cpumask_t mask;
59 59 };
60 60  
  61 +static int topology_enabled;
61 62 static void topology_work_fn(struct work_struct *work);
62 63 static struct tl_info *tl_info;
63 64 static struct core_info core_info;
... ... @@ -78,7 +79,7 @@
78 79 cpumask_t mask;
79 80  
80 81 cpus_clear(mask);
81   - if (!machine_has_topology)
  82 + if (!topology_enabled || !machine_has_topology)
82 83 return cpu_possible_map;
83 84 spin_lock_irqsave(&topology_lock, flags);
84 85 while (core) {
... ... @@ -262,6 +263,15 @@
262 263 {
263 264 schedule_work(&topology_work);
264 265 }
  266 +
  267 +static 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 +}
  274 +early_param("topology", early_parse_topology);
265 275  
266 276 static int __init init_topology_update(void)
267 277 {