Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > fc11cd6e1c513a17304da94a5390f3cd > files > 3124

kernel-2.6.18-194.11.1.el5.src.rpm

From: Hans-Joachim Picht <hpicht@redhat.com>
Date: Tue, 20 Jan 2009 16:58:34 +0100
Subject: [s390] disable cpu topology support by default
Message-id: 20090120155834.GD21694@redhat.com
O-Subject: [RHEL5 U4 PATCH 4/8] s390 - kernel: disable cpu topology support by default
Bugzilla: 475797
RH-Acked-by: Pete Zaitcev <zaitcev@redhat.com>

Description
============

If the hardware supports the configuration-topology facility
the system cpu topology information will be passed to the
scheduler.  The scheduler bases its load balancing decisions also on the
cpu topology. This may have a negative performance
impact on machines where I/O interrupts are distributed unevenly
to cpus. Those cpus which are grouped together and get more I/O
interrupts than others will tend to have a higher average load.
Solution: Disable cpu topology support by default and add a kernel parameter
which allows to switch it on. In order to switch support on
topology=on needs to be added to the kernel parameter line.

Bugzilla
=========

BZ 475797
https://bugzilla.redhat.com/show_bug.cgi?id=475797

Upstream status of the patch:
=============================

The patch is upstream as of git commit

Test status:
============

The patch has been tested and fixes the problem.
The fix has been verified by the IBM test department.

Please ACK.

With best regards,

	--Hans

diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 20ab2a9..0fb9e36 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1764,6 +1764,14 @@ running once the system is up.
 			See comment before function dc390_setup() in
 			drivers/scsi/tmscsim.c.
 
+	topology=	[S390]
+			Format: {off | on}
+			Specify if the kernel should make use of the cpu
+			topology informations if the hardware supports these.
+			The scheduler will make use of these informations and
+			e.g. base its process migration decisions on it.
+			Default is off.
+
 	tp720=		[HW,PS2]
 
 	trix=		[HW,OSS] MediaTrix AudioTrix Pro
diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c
index 9d18041..1dc0e10 100644
--- a/arch/s390/kernel/topology.c
+++ b/arch/s390/kernel/topology.c
@@ -55,6 +55,7 @@ struct core_info {
 	cpumask_t mask;
 };
 
+static int topology_enabled;
 static void topology_work_fn(void *data);
 static struct tl_info *tl_info;
 static struct core_info core_info;
@@ -220,6 +221,15 @@ static void topology_interrupt(struct pt_regs *regs, __u16 code)
 	schedule_work(&topology_work);
 }
 
+static int __init early_parse_topology(char *p)
+{
+	if (strncmp(p, "on", 2))
+		return 0;
+	topology_enabled = 1;
+	return 0;
+}
+early_param("topology", early_parse_topology);
+
 static int __init init_topology_update(void)
 {
 	int rc;
@@ -248,6 +258,8 @@ void __init s390_init_cpu_topology(void)
 	int i;
 
 	INIT_WORK(&topology_work, topology_work_fn, NULL);
+	if (!topology_enabled)
+		return;
 	if (stfle(&facility_bits, 1) <= 0)
 		return;
 	if (!(facility_bits & (1ULL << 52)))