aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-s390
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2008-04-17 01:46:13 -0400
committerHeiko Carstens <heiko.carstens@de.ibm.com>2008-04-17 01:47:01 -0400
commitc10fde0d9e2112c25052a8742e893ec5965c0007 (patch)
tree8d0e3ad337e44e9e06caabd5f0667f27e9ddaca3 /include/asm-s390
parentdbd70fb499952d0ba282f0159dafacfc31d50313 (diff)
[S390] Vertical cpu management.
If vertical cpu polarization is active then the hypervisor will dispatch certain cpus for a longer time than other cpus for maximum performance. For example if a guest would have three virtual cpus, each of them with a share of 33 percent, then in case of vertical cpu polarization all of the processing time would be combined to a single cpu which would run all the time, while the other two cpus would get nearly no cpu time. There are three different types of vertical cpus: high, medium and low. Low cpus hardly get any real cpu time, while high cpus get a full real cpu. Medium cpus get something in between. In order to switch between the two possible modes (default is horizontal) a 0 for horizontal polarization or a 1 for vertical polarization must be written to the dispatching sysfs attribute: /sys/devices/system/cpu/dispatching The polarization of each single cpu can be figured out by the polarization sysfs attribute of each cpu: /sys/devices/system/cpu/cpuX/polarization horizontal, vertical:high, vertical:medium, vertical:low or unknown. When switching polarization the polarization attribute may contain the value unknown until the configuration change is done and the kernel has figured out the new polarization of each cpu. Note that running a system with different types of vertical cpus may result in significant performance regressions. If possible only one type of vertical cpus should be used. All other cpus should be offlined. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'include/asm-s390')
-rw-r--r--include/asm-s390/smp.h1
-rw-r--r--include/asm-s390/topology.h9
2 files changed, 10 insertions, 0 deletions
diff --git a/include/asm-s390/smp.h b/include/asm-s390/smp.h
index a464a66c65d3..6f3821a6a902 100644
--- a/include/asm-s390/smp.h
+++ b/include/asm-s390/smp.h
@@ -91,6 +91,7 @@ extern void cpu_die (void) __attribute__ ((noreturn));
91extern int __cpu_up (unsigned int cpu); 91extern int __cpu_up (unsigned int cpu);
92 92
93extern struct mutex smp_cpu_state_mutex; 93extern struct mutex smp_cpu_state_mutex;
94extern int smp_cpu_polarization[];
94 95
95extern int smp_call_function_mask(cpumask_t mask, void (*func)(void *), 96extern int smp_call_function_mask(cpumask_t mask, void (*func)(void *),
96 void *info, int wait); 97 void *info, int wait);
diff --git a/include/asm-s390/topology.h b/include/asm-s390/topology.h
index 3b28a09a2108..8e97b06f298a 100644
--- a/include/asm-s390/topology.h
+++ b/include/asm-s390/topology.h
@@ -7,6 +7,15 @@
7 7
8cpumask_t cpu_coregroup_map(unsigned int cpu); 8cpumask_t cpu_coregroup_map(unsigned int cpu);
9 9
10int topology_set_cpu_management(int fc);
11void topology_schedule_update(void);
12
13#define POLARIZATION_UNKNWN (-1)
14#define POLARIZATION_HRZ (0)
15#define POLARIZATION_VL (1)
16#define POLARIZATION_VM (2)
17#define POLARIZATION_VH (3)
18
10#ifdef CONFIG_SMP 19#ifdef CONFIG_SMP
11void s390_init_cpu_topology(void); 20void s390_init_cpu_topology(void);
12#else 21#else