[arch-commits] Commit in irqbalance/trunk (4 files)

Dan McGee dan at archlinux.org
Tue Nov 8 20:31:12 UTC 2011


    Date: Tuesday, November 8, 2011 @ 15:31:12
  Author: dan
Revision: 142358

upgpkg: irqbalance 1.0.2-1

major version rebuild, 1.0.2

Modified:
  irqbalance/trunk/PKGBUILD
Deleted:
  irqbalance/trunk/Fix-detection-of-CPUs-in-sysfs.patch
  irqbalance/trunk/Special-interrupt-counts-line-NMI-may-start-with-a-s.patch
  irqbalance/trunk/current-trunk.patch

------------------------------------------------------------+
 Fix-detection-of-CPUs-in-sysfs.patch                       |   35 -
 PKGBUILD                                                   |   28 -
 Special-interrupt-counts-line-NMI-may-start-with-a-s.patch |   67 ---
 current-trunk.patch                                        |  217 -----------
 4 files changed, 8 insertions(+), 339 deletions(-)

Deleted: Fix-detection-of-CPUs-in-sysfs.patch
===================================================================
--- Fix-detection-of-CPUs-in-sysfs.patch	2011-11-08 20:23:57 UTC (rev 142357)
+++ Fix-detection-of-CPUs-in-sysfs.patch	2011-11-08 20:31:12 UTC (rev 142358)
@@ -1,35 +0,0 @@
-From: Shawn Bohrer <sbohrer at rgmadvisors.com>
-
-Only count directories that match /sys/devices/system/cpu/cpu[0-9]+ as
-CPUs.  Previously any directory that started with cpu was counted which
-caused cpufreq and cpuidle to be counted as CPUs.
-
-Signed-off-by: Shawn Bohrer <sbohrer at rgmadvisors.com>
----
- cputree.c |    3 ++-
- 1 files changed, 2 insertions(+), 1 deletions(-)
-
-diff --git a/cputree.c b/cputree.c
-index 3b0c982..b879785 100644
---- a/cputree.c
-+++ b/cputree.c
-@@ -25,6 +25,7 @@
-  */
- 
- #include "config.h"
-+#include <ctype.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
-@@ -321,7 +322,7 @@ void parse_cpu_tree(void)
- 		return;
- 	do {
- 		entry = readdir(dir);
--                if (entry && strlen(entry->d_name)>3 && strstr(entry->d_name,"cpu")) {
-+                if (entry && !strncmp(entry->d_name,"cpu", 3) && isdigit(entry->d_name[3])) {
- 			char new_path[PATH_MAX];
- 			sprintf(new_path, "/sys/devices/system/cpu/%s", entry->d_name);
- 			do_one_cpu(new_path);
--- 
-1.6.5.2
-

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2011-11-08 20:23:57 UTC (rev 142357)
+++ PKGBUILD	2011-11-08 20:31:12 UTC (rev 142358)
@@ -2,34 +2,24 @@
 # Contributor: Martin Striz <ms at poruba.net>
 
 pkgname=irqbalance
-pkgver=0.56
-pkgrel=3
+pkgver=1.0.2
+pkgrel=1
 pkgdesc="IRQ balancing daemon for SMP systems"
 arch=('i686' 'x86_64')
-url="http://www.irqbalance.org/"
+url="http://code.google.com/p/irqbalance"
 license=('GPL')
-depends=(glib2)
+depends=(glib2 numactl libcap-ng)
 makedepends=(pkgconfig)
 backup=(etc/conf.d/irqbalance)
-source=(http://irqbalance.googlecode.com/files/irqbalance-$pkgver.tbz2
+source=(http://irqbalance.googlecode.com/files/irqbalance-$pkgver.tar.gz
         irqbalance.conf.d
-        irqbalance.rc.d
-        current-trunk.patch
-        Fix-detection-of-CPUs-in-sysfs.patch
-        Special-interrupt-counts-line-NMI-may-start-with-a-s.patch)
-md5sums=('cd0c4d3b2bb84778a04fc594ad83949a'
+        irqbalance.rc.d)
+md5sums=('58e1c9c164b12d797b500634a73938b4'
          '336c1ee99818f9ecda1687e34c69fd6b'
-         'fb82fc5d267d39110baf720d81282a7c'
-         '64df09f54cf80d9ce5ff2751a882032d'
-         '00dcb394dac884c116657ade4fe623ee'
-         'e774aff57054ce3c8b5adc7c3e5a74c2')
+         'fb82fc5d267d39110baf720d81282a7c')
 
 build() {
   cd "$srcdir/$pkgname-$pkgver"
-  patch -Np0 < ../current-trunk.patch
-  patch -Np1 < ../Fix-detection-of-CPUs-in-sysfs.patch
-  patch -Np1 < ../Special-interrupt-counts-line-NMI-may-start-with-a-s.patch
-  ./autogen.sh
   ./configure --prefix=/usr
   make
 }
@@ -37,8 +27,6 @@
 package() {
   cd "$srcdir/$pkgname-$pkgver"
   make install DESTDIR="$pkgdir"
-  #install -D -m755 irqbalance $pkgdir/usr/sbin/irqbalance
-  #install -D -m644 irqbalance.1 $pkgdir/usr/share/man/man1/irqbalance.1
   install -D -m644 ../irqbalance.conf.d "$pkgdir"/etc/conf.d/irqbalance
   install -D -m755 ../irqbalance.rc.d "$pkgdir"/etc/rc.d/irqbalance
 }

Deleted: Special-interrupt-counts-line-NMI-may-start-with-a-s.patch
===================================================================
--- Special-interrupt-counts-line-NMI-may-start-with-a-s.patch	2011-11-08 20:23:57 UTC (rev 142357)
+++ Special-interrupt-counts-line-NMI-may-start-with-a-s.patch	2011-11-08 20:31:12 UTC (rev 142358)
@@ -1,67 +0,0 @@
-From: Shawn Bohrer <sbohrer at rgmadvisors.com>
-
-Special interrupt counts line NMI may start with a space
-
-The kernel determines the maximum number of possible IRQs and pads the
-first field of /proc/interrupts appropriately.  With four or more digits
-of precession the special interrupt counts all start with a space
-instead of a letter.  This caused the special interrupt counts to be
-counted on my system and that caused the cpunr count to be off when it
-reached the ERR and MIS lines forcing a CPU rescan.
-
-Signed-off-by: Shawn Bohrer <sbohrer at rgmadvisors.com>
----
- procinterrupts.c |   24 +++++++++++-------------
- 1 files changed, 11 insertions(+), 13 deletions(-)
-
-diff --git a/procinterrupts.c b/procinterrupts.c
-index e336efe..322f4de 100644
---- a/procinterrupts.c
-+++ b/procinterrupts.c
-@@ -55,20 +55,18 @@ void parse_proc_interrupts(void)
- 		if (getline(&line, &size, file)==0)
- 			break;
- 
--
-+		number = strtoul(line, &c, 10);
- 		/* lines with letters in front are special, like NMI count. Ignore */
--		if (!(line[0]==' ' || (line[0]>='0' && line[0]<='9')))
--			break;
--		c = strchr(line, ':');
--		if (!c)
-+		if (line == c)
-+			continue;
-+
-+		if (c[0] == ':')
-+			++c;
-+		else
- 			continue;
--		*c = 0;
--		c++;
--		number = strtoul(line, NULL, 10);
-+
- 		count = 0;
- 		cpunr = 0;
--
--		c2=NULL;
- 		while (1) {
- 			uint64_t C;
- 			C = strtoull(c, &c2, 10);
-@@ -78,11 +76,11 @@ void parse_proc_interrupts(void)
- 			c=c2;
- 			cpunr++;
- 		}
--		if (cpunr != core_count) 
-+		if (cpunr != core_count)
- 			need_cpu_rescan = 1;
--		
-+
- 		set_interrupt_count(number, count);
--	}		
-+	}
- 	fclose(file);
- 	free(line);
- }
--- 
-1.6.5.2
-

Deleted: current-trunk.patch
===================================================================
--- current-trunk.patch	2011-11-08 20:23:57 UTC (rev 142357)
+++ current-trunk.patch	2011-11-08 20:31:12 UTC (rev 142358)
@@ -1,217 +0,0 @@
-Index: powermode.c
-===================================================================
---- powermode.c	(.../tags/irqbalance-0.56)	(revision 33)
-+++ powermode.c	(.../trunk)	(revision 33)
-@@ -40,7 +40,8 @@
- 	char *line = NULL;
- 	size_t size = 0;
- 	char *c;
--	uint64_t dummy, irq, softirq;
-+	uint64_t dummy __attribute__((unused));
-+	uint64_t irq, softirq;
- 	file = fopen("/proc/stat", "r");
- 	if (!file)
- 		return;
-Index: cputree.c
-===================================================================
---- cputree.c	(.../tags/irqbalance-0.56)	(revision 33)
-+++ cputree.c	(.../trunk)	(revision 33)
-@@ -47,6 +47,7 @@
- /* Users want to be able to keep interrupts away from some cpus; store these in a cpumask_t */
- cpumask_t banned_cpus;
- 
-+cpumask_t cpu_possible_map;
- 
- /* 
-    it's convenient to have the complement of banned_cpus available so that 
-@@ -158,6 +159,8 @@
- 	memset(cpu, 0, sizeof(struct cpu_core));
- 
- 	cpu->number = strtoul(&path[27], NULL, 10);
-+
-+	cpu_set(cpu->number, cpu_possible_map);
- 	
- 	cpu_set(cpu->number, cpu->mask);
- 
-@@ -219,15 +222,15 @@
- 	core_count++;
- }
- 
--static void dump_irqs(int spaces, GList *interrupts)
-+static void dump_irqs(int spaces, GList *dump_interrupts)
- {
- 	struct interrupt *irq;
--	while (interrupts) {
-+	while (dump_interrupts) {
- 		int i;
--		for (i=0; i<spaces;i++) printf(" ");
--		irq = interrupts->data;
-+		for (i=0; i<spaces; i++) printf(" ");
-+		irq = dump_interrupts->data;
- 		printf("Interrupt %i (%s/%u) \n", irq->number, classes[irq->class], (unsigned int)irq->workload);
--		interrupts = g_list_next(interrupts);
-+		dump_interrupts = g_list_next(dump_interrupts);
- 	}
- }
- 
-Index: placement.c
-===================================================================
---- placement.c	(.../tags/irqbalance-0.56)	(revision 33)
-+++ placement.c	(.../trunk)	(revision 33)
-@@ -272,7 +272,7 @@
- 		}
- 		if ((!cpus_empty(irq->node_mask)) &&
- 		    (!cpus_equal(irq->mask, irq->node_mask)) &&
--		    (!cpus_full(irq->node_mask))) {
-+		    (!__cpus_full(&irq->node_mask, num_possible_cpus()))) {
- 			irq->old_mask = irq->mask;
- 			irq->mask = irq->node_mask;
- 		}
-Index: cpumask.h
-===================================================================
---- cpumask.h	(.../tags/irqbalance-0.56)	(revision 33)
-+++ cpumask.h	(.../trunk)	(revision 33)
-@@ -1,7 +1,7 @@
- #ifndef __LINUX_CPUMASK_H
- #define __LINUX_CPUMASK_H
- 
--#define NR_CPUS 256
-+#define NR_CPUS 4096
- /*
-  * Cpumasks provide a bitmap suitable for representing the
-  * set of CPU's in a system, one bit position per CPU number.
-Index: bitmap.c
-===================================================================
---- bitmap.c	(.../tags/irqbalance-0.56)	(revision 33)
-+++ bitmap.c	(.../trunk)	(revision 33)
-@@ -74,6 +74,19 @@
- 	return 1;
- }
- 
-+int __bitmap_weight(const unsigned long *bitmap, int bits)
-+{
-+	int k, w = 0, lim = bits/BITS_PER_LONG;
-+
-+	for (k = 0; k < lim; k++)
-+		w += hweight_long(bitmap[k]);
-+
-+	if (bits % BITS_PER_LONG)
-+		w += hweight_long(bitmap[k] & BITMAP_LAST_WORD_MASK(bits));
-+
-+	return w;
-+}
-+
- int __bitmap_equal(const unsigned long *bitmap1,
- 		const unsigned long *bitmap2, int bits)
- {
-Index: irqlist.c
-===================================================================
---- irqlist.c	(.../tags/irqbalance-0.56)	(revision 33)
-+++ irqlist.c	(.../trunk)	(revision 33)
-@@ -28,6 +28,7 @@
- #include <unistd.h>
- #include <sys/types.h>
- #include <dirent.h>
-+#include <errno.h>
- 
- #include "types.h"
- #include "irqbalance.h"
-@@ -39,6 +40,7 @@
- void get_affinity_hint(struct interrupt *irq, int number)
- {
- 	char buf[PATH_MAX];
-+	cpumask_t tempmask;
- 	char *line = NULL;
- 	size_t size = 0;
- 	FILE *file;
-@@ -51,7 +53,9 @@
- 		fclose(file);
- 		return;
- 	}
--	cpumask_parse_user(line, strlen(line), irq->node_mask);
-+	cpumask_parse_user(line, strlen(line), tempmask);
-+	if (!__cpus_full(&tempmask, num_possible_cpus()))
-+		irq->node_mask = tempmask;
- 	fclose(file);
- 	free(line);
- }
-@@ -64,7 +68,7 @@
- 	DIR *dir;
- 	struct dirent *entry;
- 	char *c, *c2;
--	int nr , count = 0;
-+	int nr , count = 0, can_set = 1;
- 	char buf[PATH_MAX];
- 	sprintf(buf, "/proc/irq/%i", number);
- 	dir = opendir(buf);
-@@ -77,7 +81,7 @@
- 			size_t size = 0;
- 			FILE *file;
- 			sprintf(buf, "/proc/irq/%i/smp_affinity", number);
--			file = fopen(buf, "r");
-+			file = fopen(buf, "r+");
- 			if (!file)
- 				continue;
- 			if (getline(&line, &size, file)==0) {
-@@ -86,7 +90,13 @@
- 				continue;
- 			}
- 			cpumask_parse_user(line, strlen(line), irq->mask);
--			fclose(file);
-+			/*
-+			 * Check that we can write the affinity, if
-+			 * not take it out of the list.
-+			 */
-+			fputs(line, file);
-+			if (fclose(file) && errno == EIO)
-+				can_set = 0;
- 			free(line);
- 		} else if (strcmp(entry->d_name,"allowed_affinity")==0) {
- 			char *line = NULL;
-@@ -119,7 +129,7 @@
- 			count++;
- 
- 	/* if there is no choice in the allowed mask, don't bother to balance */
--	if (count<2)
-+	if ((count<2) || (can_set == 0))
- 		 irq->balance_level = BALANCE_NONE;
- 		
- 
-Index: Makefile.am
-===================================================================
---- Makefile.am	(.../tags/irqbalance-0.56)	(revision 33)
-+++ Makefile.am	(.../trunk)	(revision 33)
-@@ -21,7 +21,7 @@
- # 
- 
- AUTOMAKE_OPTIONS = no-dependencies
--EXTRA_DIST = README INSTALL COPYING autogen.sh m4/cap-ng.m4
-+EXTRA_DIST = README INSTALL COPYING autogen.sh cap-ng.m4
-  
- INCLUDES = -I${top_srcdir} 
- LIBS = $(CAPNG_LDADD) $(GLIB_LIBS)
-@@ -31,6 +31,7 @@
- sbin_PROGRAMS = irqbalance
- irqbalance_SOURCES = activate.c bitmap.c classify.c cputree.c irqbalance.c \
- 	irqlist.c network.c numa.c placement.c powermode.c procinterrupts.c
-+dist_man_MANS = irqbalance.1
- 
- CONFIG_CLEAN_FILES = debug*.list config/*
- clean-generic:
-Index: network.c
-===================================================================
---- network.c	(.../tags/irqbalance-0.56)	(revision 33)
-+++ network.c	(.../trunk)	(revision 33)
-@@ -160,10 +160,8 @@
- 	}
- 
- 	while (!feof(file)) {
--		uint64_t rxcount;
--		uint64_t txcount;
--		uint64_t delta;
--		int dummy;
-+		uint64_t dummy __attribute__((unused));
-+		uint64_t rxcount, txcount, delta;
- 		char *c, *c2;
- 		if (getline(&line, &size, file)==0)
- 			break;




More information about the arch-commits mailing list