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

archrelease: copy trunk to extra-i686, extra-x86_64

Added:
  irqbalance/repos/extra-i686/PKGBUILD
    (from rev 142358, irqbalance/trunk/PKGBUILD)
  irqbalance/repos/extra-i686/irqbalance.conf.d
    (from rev 142358, irqbalance/trunk/irqbalance.conf.d)
  irqbalance/repos/extra-i686/irqbalance.rc.d
    (from rev 142358, irqbalance/trunk/irqbalance.rc.d)
  irqbalance/repos/extra-x86_64/PKGBUILD
    (from rev 142358, irqbalance/trunk/PKGBUILD)
  irqbalance/repos/extra-x86_64/irqbalance.conf.d
    (from rev 142358, irqbalance/trunk/irqbalance.conf.d)
  irqbalance/repos/extra-x86_64/irqbalance.rc.d
    (from rev 142358, irqbalance/trunk/irqbalance.rc.d)
Deleted:
  irqbalance/repos/extra-i686/Fix-detection-of-CPUs-in-sysfs.patch
  irqbalance/repos/extra-i686/PKGBUILD
  
irqbalance/repos/extra-i686/Special-interrupt-counts-line-NMI-may-start-with-a-s.patch
  irqbalance/repos/extra-i686/current-trunk.patch
  irqbalance/repos/extra-i686/irqbalance.conf.d
  irqbalance/repos/extra-i686/irqbalance.rc.d
  irqbalance/repos/extra-x86_64/Fix-detection-of-CPUs-in-sysfs.patch
  irqbalance/repos/extra-x86_64/PKGBUILD
  
irqbalance/repos/extra-x86_64/Special-interrupt-counts-line-NMI-may-start-with-a-s.patch
  irqbalance/repos/extra-x86_64/current-trunk.patch
  irqbalance/repos/extra-x86_64/irqbalance.conf.d
  irqbalance/repos/extra-x86_64/irqbalance.rc.d

-------------------------------------------------------------------------+
 extra-i686/Fix-detection-of-CPUs-in-sysfs.patch                         |   35 
-
 extra-i686/PKGBUILD                                                     |   76 
+--
 extra-i686/Special-interrupt-counts-line-NMI-may-start-with-a-s.patch   |   67 
---
 extra-i686/current-trunk.patch                                          |  217 
----------
 extra-i686/irqbalance.conf.d                                            |   12 
 extra-i686/irqbalance.rc.d                                              |   92 
++--
 extra-x86_64/Fix-detection-of-CPUs-in-sysfs.patch                       |   35 
-
 extra-x86_64/PKGBUILD                                                   |   76 
+--
 extra-x86_64/Special-interrupt-counts-line-NMI-may-start-with-a-s.patch |   67 
---
 extra-x86_64/current-trunk.patch                                        |  217 
----------
 extra-x86_64/irqbalance.conf.d                                          |   12 
 extra-x86_64/irqbalance.rc.d                                            |   92 
++--
 12 files changed, 168 insertions(+), 830 deletions(-)

Deleted: extra-i686/Fix-detection-of-CPUs-in-sysfs.patch
===================================================================
--- extra-i686/Fix-detection-of-CPUs-in-sysfs.patch     2011-11-08 20:31:12 UTC 
(rev 142358)
+++ extra-i686/Fix-detection-of-CPUs-in-sysfs.patch     2011-11-08 20:31:31 UTC 
(rev 142359)
@@ -1,35 +0,0 @@
-From: Shawn Bohrer <[email protected]>
-
-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 <[email protected]>
----
- 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
-

Deleted: extra-i686/PKGBUILD
===================================================================
--- extra-i686/PKGBUILD 2011-11-08 20:31:12 UTC (rev 142358)
+++ extra-i686/PKGBUILD 2011-11-08 20:31:31 UTC (rev 142359)
@@ -1,44 +0,0 @@
-# Maintainer: Dan McGee <[email protected]>
-# Contributor: Martin Striz <[email protected]>
-
-pkgname=irqbalance
-pkgver=0.56
-pkgrel=3
-pkgdesc="IRQ balancing daemon for SMP systems"
-arch=('i686' 'x86_64')
-url="http://www.irqbalance.org/";
-license=('GPL')
-depends=(glib2)
-makedepends=(pkgconfig)
-backup=(etc/conf.d/irqbalance)
-source=(http://irqbalance.googlecode.com/files/irqbalance-$pkgver.tbz2
-        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'
-         '336c1ee99818f9ecda1687e34c69fd6b'
-         'fb82fc5d267d39110baf720d81282a7c'
-         '64df09f54cf80d9ce5ff2751a882032d'
-         '00dcb394dac884c116657ade4fe623ee'
-         'e774aff57054ce3c8b5adc7c3e5a74c2')
-
-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
-}
-
-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
-}

Copied: irqbalance/repos/extra-i686/PKGBUILD (from rev 142358, 
irqbalance/trunk/PKGBUILD)
===================================================================
--- extra-i686/PKGBUILD                         (rev 0)
+++ extra-i686/PKGBUILD 2011-11-08 20:31:31 UTC (rev 142359)
@@ -0,0 +1,32 @@
+# Maintainer: Dan McGee <[email protected]>
+# Contributor: Martin Striz <[email protected]>
+
+pkgname=irqbalance
+pkgver=1.0.2
+pkgrel=1
+pkgdesc="IRQ balancing daemon for SMP systems"
+arch=('i686' 'x86_64')
+url="http://code.google.com/p/irqbalance";
+license=('GPL')
+depends=(glib2 numactl libcap-ng)
+makedepends=(pkgconfig)
+backup=(etc/conf.d/irqbalance)
+source=(http://irqbalance.googlecode.com/files/irqbalance-$pkgver.tar.gz
+        irqbalance.conf.d
+        irqbalance.rc.d)
+md5sums=('58e1c9c164b12d797b500634a73938b4'
+         '336c1ee99818f9ecda1687e34c69fd6b'
+         'fb82fc5d267d39110baf720d81282a7c')
+
+build() {
+  cd "$srcdir/$pkgname-$pkgver"
+  ./configure --prefix=/usr
+  make
+}
+
+package() {
+  cd "$srcdir/$pkgname-$pkgver"
+  make install DESTDIR="$pkgdir"
+  install -D -m644 ../irqbalance.conf.d "$pkgdir"/etc/conf.d/irqbalance
+  install -D -m755 ../irqbalance.rc.d "$pkgdir"/etc/rc.d/irqbalance
+}

Deleted: extra-i686/Special-interrupt-counts-line-NMI-may-start-with-a-s.patch
===================================================================
--- extra-i686/Special-interrupt-counts-line-NMI-may-start-with-a-s.patch       
2011-11-08 20:31:12 UTC (rev 142358)
+++ extra-i686/Special-interrupt-counts-line-NMI-may-start-with-a-s.patch       
2011-11-08 20:31:31 UTC (rev 142359)
@@ -1,67 +0,0 @@
-From: Shawn Bohrer <[email protected]>
-
-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 <[email protected]>
----
- 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: extra-i686/current-trunk.patch
===================================================================
--- extra-i686/current-trunk.patch      2011-11-08 20:31:12 UTC (rev 142358)
+++ extra-i686/current-trunk.patch      2011-11-08 20:31:31 UTC (rev 142359)
@@ -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;

Deleted: extra-i686/irqbalance.conf.d
===================================================================
--- extra-i686/irqbalance.conf.d        2011-11-08 20:31:12 UTC (rev 142358)
+++ extra-i686/irqbalance.conf.d        2011-11-08 20:31:31 UTC (rev 142359)
@@ -1,6 +0,0 @@
-#
-# Settings for irqbalance daemon
-#
-
-# one shot mode - set to 1 if you have Pentium 4 with HT
-ONESHOT=0

Copied: irqbalance/repos/extra-i686/irqbalance.conf.d (from rev 142358, 
irqbalance/trunk/irqbalance.conf.d)
===================================================================
--- extra-i686/irqbalance.conf.d                                (rev 0)
+++ extra-i686/irqbalance.conf.d        2011-11-08 20:31:31 UTC (rev 142359)
@@ -0,0 +1,6 @@
+#
+# Settings for irqbalance daemon
+#
+
+# one shot mode - set to 1 if you have Pentium 4 with HT
+ONESHOT=0

Deleted: extra-i686/irqbalance.rc.d
===================================================================
--- extra-i686/irqbalance.rc.d  2011-11-08 20:31:12 UTC (rev 142358)
+++ extra-i686/irqbalance.rc.d  2011-11-08 20:31:31 UTC (rev 142359)
@@ -1,46 +0,0 @@
-#!/bin/bash
-
-# source application-specific settings
-ONESHOT=0
-[ -f /etc/conf.d/irqbalance ] && . /etc/conf.d/irqbalance
-
-if [ "$ONESHOT" -ne 0 ]; then
-       ONESHOT_CMD="--oneshot"
-fi
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-
-PID=`pidof -o %PPID /usr/sbin/irqbalance`
-case "$1" in
-  start)
-    stat_busy "Starting IRQ balancing"
-    [ -z "$PID" ] && /usr/sbin/irqbalance $ONESHOT_CMD
-    if [ $? -gt 0 ]; then
-      stat_fail
-    else
-      if [ "$ONESHOT" -eq 0 ]; then
-        add_daemon irqbalance
-      fi
-      stat_done
-    fi
-    ;;
-  stop)
-    stat_busy "Stopping IRQ balancing"
-    [ ! -z "$PID" ] && kill $PID &> /dev/null
-    if [ $? -gt 0 ]; then
-      stat_fail
-    else
-      rm_daemon irqbalance
-      stat_done
-    fi
-    ;;
-  restart)
-    $0 stop
-    sleep 1
-    $0 start
-    ;;
-  *)
-    echo "usage: $0 {start|stop|restart}"  
-esac
-exit 0

Copied: irqbalance/repos/extra-i686/irqbalance.rc.d (from rev 142358, 
irqbalance/trunk/irqbalance.rc.d)
===================================================================
--- extra-i686/irqbalance.rc.d                          (rev 0)
+++ extra-i686/irqbalance.rc.d  2011-11-08 20:31:31 UTC (rev 142359)
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+# source application-specific settings
+ONESHOT=0
+[ -f /etc/conf.d/irqbalance ] && . /etc/conf.d/irqbalance
+
+if [ "$ONESHOT" -ne 0 ]; then
+       ONESHOT_CMD="--oneshot"
+fi
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/sbin/irqbalance`
+case "$1" in
+  start)
+    stat_busy "Starting IRQ balancing"
+    [ -z "$PID" ] && /usr/sbin/irqbalance $ONESHOT_CMD
+    if [ $? -gt 0 ]; then
+      stat_fail
+    else
+      if [ "$ONESHOT" -eq 0 ]; then
+        add_daemon irqbalance
+      fi
+      stat_done
+    fi
+    ;;
+  stop)
+    stat_busy "Stopping IRQ balancing"
+    [ ! -z "$PID" ] && kill $PID &> /dev/null
+    if [ $? -gt 0 ]; then
+      stat_fail
+    else
+      rm_daemon irqbalance
+      stat_done
+    fi
+    ;;
+  restart)
+    $0 stop
+    sleep 1
+    $0 start
+    ;;
+  *)
+    echo "usage: $0 {start|stop|restart}"  
+esac
+exit 0

Deleted: extra-x86_64/Fix-detection-of-CPUs-in-sysfs.patch
===================================================================
--- extra-x86_64/Fix-detection-of-CPUs-in-sysfs.patch   2011-11-08 20:31:12 UTC 
(rev 142358)
+++ extra-x86_64/Fix-detection-of-CPUs-in-sysfs.patch   2011-11-08 20:31:31 UTC 
(rev 142359)
@@ -1,35 +0,0 @@
-From: Shawn Bohrer <[email protected]>
-
-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 <[email protected]>
----
- 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
-

Deleted: extra-x86_64/PKGBUILD
===================================================================
--- extra-x86_64/PKGBUILD       2011-11-08 20:31:12 UTC (rev 142358)
+++ extra-x86_64/PKGBUILD       2011-11-08 20:31:31 UTC (rev 142359)
@@ -1,44 +0,0 @@
-# Maintainer: Dan McGee <[email protected]>
-# Contributor: Martin Striz <[email protected]>
-
-pkgname=irqbalance
-pkgver=0.56
-pkgrel=3
-pkgdesc="IRQ balancing daemon for SMP systems"
-arch=('i686' 'x86_64')
-url="http://www.irqbalance.org/";
-license=('GPL')
-depends=(glib2)
-makedepends=(pkgconfig)
-backup=(etc/conf.d/irqbalance)
-source=(http://irqbalance.googlecode.com/files/irqbalance-$pkgver.tbz2
-        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'
-         '336c1ee99818f9ecda1687e34c69fd6b'
-         'fb82fc5d267d39110baf720d81282a7c'
-         '64df09f54cf80d9ce5ff2751a882032d'
-         '00dcb394dac884c116657ade4fe623ee'
-         'e774aff57054ce3c8b5adc7c3e5a74c2')
-
-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
-}
-
-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
-}

Copied: irqbalance/repos/extra-x86_64/PKGBUILD (from rev 142358, 
irqbalance/trunk/PKGBUILD)
===================================================================
--- extra-x86_64/PKGBUILD                               (rev 0)
+++ extra-x86_64/PKGBUILD       2011-11-08 20:31:31 UTC (rev 142359)
@@ -0,0 +1,32 @@
+# Maintainer: Dan McGee <[email protected]>
+# Contributor: Martin Striz <[email protected]>
+
+pkgname=irqbalance
+pkgver=1.0.2
+pkgrel=1
+pkgdesc="IRQ balancing daemon for SMP systems"
+arch=('i686' 'x86_64')
+url="http://code.google.com/p/irqbalance";
+license=('GPL')
+depends=(glib2 numactl libcap-ng)
+makedepends=(pkgconfig)
+backup=(etc/conf.d/irqbalance)
+source=(http://irqbalance.googlecode.com/files/irqbalance-$pkgver.tar.gz
+        irqbalance.conf.d
+        irqbalance.rc.d)
+md5sums=('58e1c9c164b12d797b500634a73938b4'
+         '336c1ee99818f9ecda1687e34c69fd6b'
+         'fb82fc5d267d39110baf720d81282a7c')
+
+build() {
+  cd "$srcdir/$pkgname-$pkgver"
+  ./configure --prefix=/usr
+  make
+}
+
+package() {
+  cd "$srcdir/$pkgname-$pkgver"
+  make install DESTDIR="$pkgdir"
+  install -D -m644 ../irqbalance.conf.d "$pkgdir"/etc/conf.d/irqbalance
+  install -D -m755 ../irqbalance.rc.d "$pkgdir"/etc/rc.d/irqbalance
+}

Deleted: extra-x86_64/Special-interrupt-counts-line-NMI-may-start-with-a-s.patch
===================================================================
--- extra-x86_64/Special-interrupt-counts-line-NMI-may-start-with-a-s.patch     
2011-11-08 20:31:12 UTC (rev 142358)
+++ extra-x86_64/Special-interrupt-counts-line-NMI-may-start-with-a-s.patch     
2011-11-08 20:31:31 UTC (rev 142359)
@@ -1,67 +0,0 @@
-From: Shawn Bohrer <[email protected]>
-
-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 <[email protected]>
----
- 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: extra-x86_64/current-trunk.patch
===================================================================
--- extra-x86_64/current-trunk.patch    2011-11-08 20:31:12 UTC (rev 142358)
+++ extra-x86_64/current-trunk.patch    2011-11-08 20:31:31 UTC (rev 142359)
@@ -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;

Deleted: extra-x86_64/irqbalance.conf.d
===================================================================
--- extra-x86_64/irqbalance.conf.d      2011-11-08 20:31:12 UTC (rev 142358)
+++ extra-x86_64/irqbalance.conf.d      2011-11-08 20:31:31 UTC (rev 142359)
@@ -1,6 +0,0 @@
-#
-# Settings for irqbalance daemon
-#
-
-# one shot mode - set to 1 if you have Pentium 4 with HT
-ONESHOT=0

Copied: irqbalance/repos/extra-x86_64/irqbalance.conf.d (from rev 142358, 
irqbalance/trunk/irqbalance.conf.d)
===================================================================
--- extra-x86_64/irqbalance.conf.d                              (rev 0)
+++ extra-x86_64/irqbalance.conf.d      2011-11-08 20:31:31 UTC (rev 142359)
@@ -0,0 +1,6 @@
+#
+# Settings for irqbalance daemon
+#
+
+# one shot mode - set to 1 if you have Pentium 4 with HT
+ONESHOT=0

Deleted: extra-x86_64/irqbalance.rc.d
===================================================================
--- extra-x86_64/irqbalance.rc.d        2011-11-08 20:31:12 UTC (rev 142358)
+++ extra-x86_64/irqbalance.rc.d        2011-11-08 20:31:31 UTC (rev 142359)
@@ -1,46 +0,0 @@
-#!/bin/bash
-
-# source application-specific settings
-ONESHOT=0
-[ -f /etc/conf.d/irqbalance ] && . /etc/conf.d/irqbalance
-
-if [ "$ONESHOT" -ne 0 ]; then
-       ONESHOT_CMD="--oneshot"
-fi
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-
-PID=`pidof -o %PPID /usr/sbin/irqbalance`
-case "$1" in
-  start)
-    stat_busy "Starting IRQ balancing"
-    [ -z "$PID" ] && /usr/sbin/irqbalance $ONESHOT_CMD
-    if [ $? -gt 0 ]; then
-      stat_fail
-    else
-      if [ "$ONESHOT" -eq 0 ]; then
-        add_daemon irqbalance
-      fi
-      stat_done
-    fi
-    ;;
-  stop)
-    stat_busy "Stopping IRQ balancing"
-    [ ! -z "$PID" ] && kill $PID &> /dev/null
-    if [ $? -gt 0 ]; then
-      stat_fail
-    else
-      rm_daemon irqbalance
-      stat_done
-    fi
-    ;;
-  restart)
-    $0 stop
-    sleep 1
-    $0 start
-    ;;
-  *)
-    echo "usage: $0 {start|stop|restart}"  
-esac
-exit 0

Copied: irqbalance/repos/extra-x86_64/irqbalance.rc.d (from rev 142358, 
irqbalance/trunk/irqbalance.rc.d)
===================================================================
--- extra-x86_64/irqbalance.rc.d                                (rev 0)
+++ extra-x86_64/irqbalance.rc.d        2011-11-08 20:31:31 UTC (rev 142359)
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+# source application-specific settings
+ONESHOT=0
+[ -f /etc/conf.d/irqbalance ] && . /etc/conf.d/irqbalance
+
+if [ "$ONESHOT" -ne 0 ]; then
+       ONESHOT_CMD="--oneshot"
+fi
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/sbin/irqbalance`
+case "$1" in
+  start)
+    stat_busy "Starting IRQ balancing"
+    [ -z "$PID" ] && /usr/sbin/irqbalance $ONESHOT_CMD
+    if [ $? -gt 0 ]; then
+      stat_fail
+    else
+      if [ "$ONESHOT" -eq 0 ]; then
+        add_daemon irqbalance
+      fi
+      stat_done
+    fi
+    ;;
+  stop)
+    stat_busy "Stopping IRQ balancing"
+    [ ! -z "$PID" ] && kill $PID &> /dev/null
+    if [ $? -gt 0 ]; then
+      stat_fail
+    else
+      rm_daemon irqbalance
+      stat_done
+    fi
+    ;;
+  restart)
+    $0 stop
+    sleep 1
+    $0 start
+    ;;
+  *)
+    echo "usage: $0 {start|stop|restart}"  
+esac
+exit 0

Reply via email to