rpms/irqbalance/devel irqbalance-multicore.patch, NONE, 1.1 irqbalance.spec, 1.36, 1.37

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Wed Nov 8 20:22:35 UTC 2006


Author: nhorman

Update of /cvs/dist/rpms/irqbalance/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv22345

Modified Files:
	irqbalance.spec 
Added Files:
	irqbalance-multicore.patch 
Log Message:
fixing bz 211183

irqbalance-multicore.patch:
 cpuinfo.c |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

--- NEW FILE irqbalance-multicore.patch ---
--- irqbalance-1.13/irqbalance/cpuinfo.c.orig	2006-10-19 16:21:01.000000000 -0400
+++ irqbalance-1.13/irqbalance/cpuinfo.c	2006-10-19 16:40:54.000000000 -0400
@@ -23,6 +23,7 @@
 
 static int siblings[MAX_CPU];	         /* number of HT siblings for each cpu */
 static unsigned int cpunumber[MAX_CPU];  /* physical package identifier for each CPU*/
+static unsigned int core_id[MAX_CPU];  /* physical package identifier for each CPU*/
 int cpucount = -1;		         /* total number of CPU's */
 int machineneedsbalance;		 /* set to 15 for Intel pIV, 0 or 1 elsewhere */
 unsigned int cpubrother[MAX_CPU];        /* the cpu number of the HT sibling if present, if absent
@@ -55,10 +56,11 @@
 			sscanf(linebuffer,"siblings\t: %i", &siblings[cpucount]);
 		else if (strstr(linebuffer,"physical id\t:"))
 			sscanf(linebuffer,"physical id\t: %ui", &cpunumber[cpucount]);
-		else if (strstr(linebuffer,"GenuineIntel")) {
-			if (!machineneedsbalance)
-				machineneedsbalance = 1;
-		} else if (machineneedsbalance && strstr(linebuffer,"cpu family\t:"))
+		else if (strstr(linebuffer,"GenuineIntel"))
+			machineneedsbalance = (!machineneedsbalance) ? 1 : 0;
+		else if (strstr(linebuffer,"core id\t:"))
+			sscanf(linebuffer, "core id\t: %ui", &core_id[cpucount]);	
+		else if (machineneedsbalance && strstr(linebuffer,"cpu family\t:"))
 			sscanf(linebuffer,"cpu family\t: %ui",&machineneedsbalance);
 	}
 	
@@ -75,7 +77,8 @@
 	/* and brute-force the search */
 	for (i = 0; i < cpucount; i++)
 	 	for (j=0; j < cpucount; j++) {
-	 		if ( (cpunumber[i]==cpunumber[j]) && (i!=j) && (siblings[i]>1)) {
+	 		if ( (cpunumber[i]==cpunumber[j]) && (i!=j) && 
+			     (siblings[i]>1) && (core_id[i]==core_id[j])) {
 	 			cpubrother[i] = j;
 	 			continue;
 	 		}


Index: irqbalance.spec
===================================================================
RCS file: /cvs/dist/rpms/irqbalance/devel/irqbalance.spec,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- irqbalance.spec	2 Nov 2006 16:17:51 -0000	1.36
+++ irqbalance.spec	8 Nov 2006 20:22:33 -0000	1.37
@@ -1,7 +1,7 @@
 Summary:        IRQ balancing daemon.
 Name:           irqbalance
 Version:        1.13
-Release: 	6%{?dist}
+Release: 	7%{?dist}
 Epoch:		1
 Group:          System Environment/Base
 License:        GPL/OSL
@@ -15,6 +15,8 @@
 Patch3: irqbalance-classes.patch
 Patch4: irqbalance-oneshot.patch
 Patch5: irqbalance-max-interrupts-increase.patch
+Patch6: irqbalance-multicore.patch
+
 ExclusiveArch:	i386 x86_64 ia64 ppc ppc64
 Obsoletes:	kernel-utils
 
@@ -29,6 +31,7 @@
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
 
 %build
 rm -rf $RPM_BUILD_ROOT
@@ -76,6 +79,9 @@
 
 
 %changelog
+* Wed Nov 08 2006 Neil Horman <nhorman at redhat.com> - 1.13-7
+- fix up irqbalance to detect multicore (not ht) (bz 211183)
+
 * Thu Nov 02 2006 Neil Horman <nhorman at redhat.com> - 1.13-6
 - bumping up MAX_INTERRUPTS to support xen kernels
 - rediffing patch1 and patch3 to remove fuzz




More information about the fedora-cvs-commits mailing list