]> git.ipfire.org Git - ipfire-2.x.git/blob - src/patches/suse-2.6.27.39/patches.arch/s390-05-08-topology.patch
Fix oinkmaster patch.
[ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.arch / s390-05-08-topology.patch
1 From: Gerald Schaefer <geraldsc@de.ibm.com>
2 Subject: kernel: disable cpu topology support by default
3 References: bnc#450096,LTC#50392
4
5 Symptom: System performance may be lower than expected.
6 Problem: If the hardware supports the configuration-topology facility
7 the system cpu topology information will be passed to the
8 scheduler. The scheduler bases its load balancing decisions
9 also on the cpu topology. This may have a negative performance
10 impact on machines where I/O interrupts are distributed unevenly
11 to cpus. Those cpus which are grouped together and get more I/O
12 interrupts than others will tend to have a higher average load.
13 Solution: Disable cpu topology support by default and add a kernel parameter
14 which allows to switch it on. In order to switch support on
15 topology=on needs to be added to the kernel parameter line.
16
17 Acked-by: John Jolly <jjolly@suse.de>
18 ---
19 Documentation/kernel-parameters.txt | 8 ++++++++
20 arch/s390/kernel/topology.c | 12 +++++++++++-
21 2 files changed, 19 insertions(+), 1 deletion(-)
22
23 --- a/Documentation/kernel-parameters.txt
24 +++ b/Documentation/kernel-parameters.txt
25 @@ -2201,6 +2201,14 @@ and is between 256 and 4096 characters.
26 See comment before function dc390_setup() in
27 drivers/scsi/tmscsim.c.
28
29 + topology= [S390]
30 + Format: {off | on}
31 + Specify if the kernel should make use of the cpu
32 + topology informations if the hardware supports these.
33 + The scheduler will make use of these informations and
34 + e.g. base its process migration decisions on it.
35 + Default is off.
36 +
37 tp720= [HW,PS2]
38
39 trix= [HW,OSS] MediaTrix AudioTrix Pro
40 --- a/arch/s390/kernel/topology.c
41 +++ b/arch/s390/kernel/topology.c
42 @@ -59,6 +59,7 @@ struct core_info {
43 cpumask_t mask;
44 };
45
46 +static int topology_enabled;
47 static void topology_work_fn(struct work_struct *work);
48 static struct tl_info *tl_info;
49 static struct core_info core_info;
50 @@ -79,7 +80,7 @@ cpumask_t cpu_coregroup_map(unsigned int
51 cpumask_t mask;
52
53 cpus_clear(mask);
54 - if (!machine_has_topology)
55 + if (!topology_enabled || !machine_has_topology)
56 return cpu_present_map;
57 spin_lock_irqsave(&topology_lock, flags);
58 while (core) {
59 @@ -264,6 +265,15 @@ static void topology_interrupt(__u16 cod
60 schedule_work(&topology_work);
61 }
62
63 +static int __init early_parse_topology(char *p)
64 +{
65 + if (strncmp(p, "on", 2))
66 + return 0;
67 + topology_enabled = 1;
68 + return 0;
69 +}
70 +early_param("topology", early_parse_topology);
71 +
72 static int __init init_topology_update(void)
73 {
74 int rc;