This commit is contained in:
commit
1d25fb5a4f
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
91
irq_balancer
Normal file
91
irq_balancer
Normal file
@ -0,0 +1,91 @@
|
||||
#! /bin/sh
|
||||
# Copyright (c) 1995-2002 SuSE Linux AG, Nuernberg, Germany.
|
||||
# All rights reserved.
|
||||
#
|
||||
# /etc/init.d/irqbalance
|
||||
# and its symbolic link
|
||||
# /(usr/)sbin/rcirqbalance
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: irqbalance
|
||||
# Required-Start:
|
||||
# X-UnitedLinux-Should-Start:
|
||||
# Required-Stop:
|
||||
# X-UnitedLinux-Should-Stop:
|
||||
# Default-Start: 1 2 3 5
|
||||
# Default-Stop: 0 6
|
||||
# Short-Description: irqbalance daemon providing irq balancing on MP-machines
|
||||
# Description: Start irqbalance to allow interrrupt balancing over multiple CPUs
|
||||
# usually all irqs are handled by cpu0, this daemon dynamcally
|
||||
# uses all cpus for the irqs
|
||||
#
|
||||
#
|
||||
#
|
||||
### END INIT INFO
|
||||
|
||||
# Check for missing binaries (stale symlinks should not happen)
|
||||
IRQBALANCE_BIN=/usr/sbin/irqbalance
|
||||
test -x $IRQBALANCE_BIN || exit 5
|
||||
PHYS=$(grep '^physical id' /proc/cpuinfo | sort -u | wc -l)
|
||||
PROC=$(grep -c '^processor' /proc/cpuinfo)
|
||||
|
||||
. /etc/rc.status
|
||||
|
||||
# Reset status of this service
|
||||
rc_reset
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting irqbalance "
|
||||
if [ $PHYS -gt 1 ] || [ $PROC -gt 1 -a $PHYS -eq 0 ] ; then
|
||||
startproc $IRQBALANCE_BIN
|
||||
# Remember status and be verbose
|
||||
rc_status -v
|
||||
else
|
||||
rc_status -u
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
echo -n "Shutting down irqbalance "
|
||||
killproc -TERM $IRQBALANCE_BIN
|
||||
|
||||
# Remember status and be verbose
|
||||
rc_status -v
|
||||
;;
|
||||
try-restart)
|
||||
$0 status >/dev/null && $0 restart
|
||||
|
||||
# Remember status and be quiet
|
||||
rc_status
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
$0 start
|
||||
|
||||
# Remember status and be quiet
|
||||
rc_status
|
||||
;;
|
||||
force-reload|reload)
|
||||
echo -n "Reload service irqbalance "
|
||||
if [ $PHYS -gt 1 ] || [ $PROC -gt 1 -a $PHYS -eq 0 ] ; then
|
||||
## if it supports it:
|
||||
killproc -HUP $IRQBALANCE_BIN
|
||||
#touch /var/run/irqbalance.pid
|
||||
rc_status -v
|
||||
else
|
||||
rc_status -u
|
||||
fi
|
||||
;;
|
||||
status)
|
||||
echo -n "Checking for service irqbalance "
|
||||
checkproc $IRQBALANCE_BIN
|
||||
rc_status -v
|
||||
;;
|
||||
probe)
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
rc_exit
|
3
irqbalance-0.09.tar.gz
Normal file
3
irqbalance-0.09.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:dd6cfe439c7e347ae60e0b950402cb4434f39b7e01261900b6daddcf21522112
|
||||
size 10523
|
45
irqbalance-assert.diff
Normal file
45
irqbalance-assert.diff
Normal file
@ -0,0 +1,45 @@
|
||||
diff -urN irqbalance.orig/cpuinfo.c irqbalance/cpuinfo.c
|
||||
--- irqbalance.orig/cpuinfo.c 2006-04-11 12:06:42.000000000 -0500
|
||||
+++ irqbalance/cpuinfo.c 2006-04-11 13:02:51.000000000 -0500
|
||||
@@ -37,16 +37,25 @@
|
||||
assert(file != NULL);
|
||||
while (!feof(file) && cpucount < MAX_CPU) {
|
||||
fgets(linebuffer, 1024, file);
|
||||
- if (strstr(linebuffer,"Physical processor ID\t:"))
|
||||
+ if (strstr(linebuffer,"Physical processor ID\t:")) {
|
||||
sscanf(linebuffer,"Physical processor ID\t: %ui", &cpunumber[cpucount]);
|
||||
+ assert(cpunumber[cpucount] < MAX_CPU);
|
||||
+ }
|
||||
+
|
||||
else if (strstr(linebuffer,"processor\t:"))
|
||||
cpucount++;
|
||||
- else if (strstr(linebuffer,"Number of siblings\t:"))
|
||||
+ else if (strstr(linebuffer,"Number of siblings\t:")) {
|
||||
sscanf(linebuffer,"Number of siblings \t: %i", &siblings[cpucount]);
|
||||
- else if (strstr(linebuffer,"siblings\t:"))
|
||||
+ assert(siblings[cpucount] < MAX_CPU);
|
||||
+ }
|
||||
+ else if (strstr(linebuffer,"siblings\t:")) {
|
||||
sscanf(linebuffer,"siblings\t: %i", &siblings[cpucount]);
|
||||
- else if (strstr(linebuffer,"physical id\t:"))
|
||||
+ assert(siblings[cpucount] < MAX_CPU);
|
||||
+ }
|
||||
+ else if (strstr(linebuffer,"physical id\t:")) {
|
||||
sscanf(linebuffer,"physical id\t: %ui", &cpunumber[cpucount]);
|
||||
+ assert(cpunumber[cpucount] < MAX_CPU);
|
||||
+ }
|
||||
else if (strstr(linebuffer,"GenuineIntel")) {
|
||||
if (!machineneedsbalance)
|
||||
machineneedsbalance = 1;
|
||||
Files irqbalance.orig/irqbalance and irqbalance/irqbalance differ
|
||||
diff -urN irqbalance.orig/procinterrupts.c irqbalance/procinterrupts.c
|
||||
--- irqbalance.orig/procinterrupts.c 2006-04-11 12:06:42.000000000 -0500
|
||||
+++ irqbalance/procinterrupts.c 2006-04-11 13:03:03.000000000 -0500
|
||||
@@ -102,6 +102,7 @@
|
||||
ret = sscanf(word,"%i",&irqnumber);
|
||||
if (!ret) /* non numeric end stuff */
|
||||
irqnumber = MAX_INTERRUPTS-1;
|
||||
+ assert(irqnumber < MAX_INTERRUPTS);
|
||||
/* then N columns of counts, where N is the number of cpu's */
|
||||
} else if (column <= cpucount) {
|
||||
sscanf(word,"%lli",&count);
|
14
irqbalance-increase-limits
Normal file
14
irqbalance-increase-limits
Normal file
@ -0,0 +1,14 @@
|
||||
diff -u irqbalance/prototypes.h~ irqbalance/prototypes.h
|
||||
--- irqbalance/prototypes.h~ 2003-09-06 13:01:32.000000000 +0200
|
||||
+++ irqbalance/prototypes.h 2006-02-08 13:09:49.000000000 +0100
|
||||
@@ -25,8 +25,8 @@
|
||||
#define POLICY_ROTATE 1
|
||||
#define POLICY_IGNORE 2
|
||||
|
||||
-#define MAX_CPU 32
|
||||
-#define MAX_INTERRUPTS 256
|
||||
+#define MAX_CPU 128
|
||||
+#define MAX_INTERRUPTS 256
|
||||
|
||||
extern unsigned int cpubrother[];
|
||||
extern unsigned int class_policy[];
|
11
irqbalance-increase-limits2
Normal file
11
irqbalance-increase-limits2
Normal file
@ -0,0 +1,11 @@
|
||||
--- prototypes.h.ORG 2006-05-09 10:29:29.000000000 +0200
|
||||
+++ prototypes.h 2006-05-09 10:31:01.000000000 +0200
|
||||
@@ -26,7 +26,7 @@
|
||||
#define POLICY_IGNORE 2
|
||||
|
||||
#define MAX_CPU 128
|
||||
-#define MAX_INTERRUPTS 256
|
||||
+#define MAX_INTERRUPTS 512
|
||||
|
||||
extern unsigned int cpubrother[];
|
||||
extern unsigned int class_policy[];
|
83
irqbalance.changes
Normal file
83
irqbalance.changes
Normal file
@ -0,0 +1,83 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 14 11:10:59 CEST 2006 - sf@suse.de
|
||||
|
||||
- added patch from bug #171500, fixing regexps
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 16 09:53:02 CEST 2006 - sf@suse.de
|
||||
|
||||
- added irqbalance-assert.diff to completely fix
|
||||
bug #158186 (see changelog entry below)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 9 10:33:40 CEST 2006 - sf@suse.de
|
||||
|
||||
- increase MAX_INTERRUPTS to 512 to avoid
|
||||
segfault (bug #158186)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 3 13:37:34 CEST 2006 - sf@suse.de
|
||||
|
||||
- modified startscript to start irqbalancing only on real SMP
|
||||
machines (multisocket) (bug #171500)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 9 00:05:31 CET 2006 - ak@suse.de
|
||||
|
||||
- increase max number of cpus to 128 (#146945)
|
||||
- install manpage
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 25 21:36:42 CET 2006 - mls@suse.de
|
||||
|
||||
- converted neededforbuild to BuildRequires
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 31 12:22:21 CET 2005 - dmueller@suse.de
|
||||
|
||||
- don't build as root
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 2 12:41:38 CEST 2005 - ro@suse.de
|
||||
|
||||
- rcscript: ignore on machines with < 2 CPUs
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 21 00:49:26 CEST 2005 - ro@suse.de
|
||||
|
||||
- build with fPIE/pie
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 16 21:23:23 CET 2004 - sf@suse.de
|
||||
|
||||
- update to 0.09
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Sep 20 16:00:17 CEST 2003 - kukuk@suse.de
|
||||
|
||||
- Add PreRequires for insserv
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 4 16:00:32 CEST 2003 - ro@suse.de
|
||||
|
||||
- added stop_on_removal and restart_on_update
|
||||
- changed insserv_and_fillup to insserv_force_if_yast
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 4 15:20:13 CEST 2003 - sf@suse.de
|
||||
|
||||
- added %insserv_and_fillup in %post
|
||||
and %insserv_cleanup in %postun
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 4 11:46:23 CEST 2003 - ak@suse.de
|
||||
|
||||
- update to version 0.6
|
||||
- Clean up init script a bit
|
||||
- Move initscript outside tar and mark as source
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 21 14:56:26 CET 2003 - sf@suse.de
|
||||
|
||||
- initial version 0.1
|
||||
|
115
irqbalance.spec
Normal file
115
irqbalance.spec
Normal file
@ -0,0 +1,115 @@
|
||||
#
|
||||
# spec file for package irqbalance (Version 0.09)
|
||||
#
|
||||
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# This file and all modifications and additions to the pristine
|
||||
# package are under the same license as the package itself.
|
||||
#
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
# norootforbuild
|
||||
|
||||
Name: irqbalance
|
||||
License: Other License(s), see package
|
||||
Group: System/Daemons
|
||||
Autoreqprov: on
|
||||
PreReq: %insserv_prereq
|
||||
Version: 0.09
|
||||
Release: 61
|
||||
Summary: Balance IRQs on SMP Machines
|
||||
Source: %{name}-%{version}.tar.gz
|
||||
Source2: irq_balancer
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Patch0: irqbalance-increase-limits
|
||||
Patch1: irqbalance-increase-limits2
|
||||
Patch2: irqbalance-assert.diff
|
||||
|
||||
%description
|
||||
irqbalance dynamically switches the CPUs for IRQs to prevent cpu0 from
|
||||
being used for all IRQs.
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Arjan van de Ven <arjanv@redhat.com>
|
||||
|
||||
%prep
|
||||
%setup -n irqbalance
|
||||
%patch0 -p1
|
||||
%patch1
|
||||
%patch2 -p1
|
||||
|
||||
%build
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
make CFLAGS="$RPM_OPT_FLAGS -fPIE -pie"
|
||||
|
||||
%install
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/sbin
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/init.d
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1/
|
||||
cp irqbalance $RPM_BUILD_ROOT/usr/sbin
|
||||
cp $RPM_SOURCE_DIR/irq_balancer $RPM_BUILD_ROOT/etc/init.d
|
||||
ln -s /etc/init.d/irq_balancer $RPM_BUILD_ROOT/usr/sbin/rcirq_balancer
|
||||
cp irqbalance.1 $RPM_BUILD_ROOT/usr/share/man/man1/
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%preun
|
||||
%stop_on_removal irq_balancer
|
||||
|
||||
%post
|
||||
%insserv_force_if_yast irq_balancer
|
||||
|
||||
%postun
|
||||
%restart_on_update irq_balancer
|
||||
%insserv_cleanup
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
/usr/sbin/irqbalance
|
||||
/etc/init.d/irq_balancer
|
||||
/usr/sbin/rcirq_balancer
|
||||
/usr/share/man/*/*
|
||||
|
||||
%changelog -n irqbalance
|
||||
* Fri Jul 14 2006 - sf@suse.de
|
||||
- added patch from bug #171500, fixing regexps
|
||||
* Tue May 16 2006 - sf@suse.de
|
||||
- added irqbalance-assert.diff to completely fix
|
||||
bug #158186 (see changelog entry below)
|
||||
* Tue May 09 2006 - sf@suse.de
|
||||
- increase MAX_INTERRUPTS to 512 to avoid
|
||||
segfault (bug #158186)
|
||||
* Wed May 03 2006 - sf@suse.de
|
||||
- modified startscript to start irqbalancing only on real SMP
|
||||
machines (multisocket) (bug #171500)
|
||||
* Thu Feb 09 2006 - ak@suse.de
|
||||
- increase max number of cpus to 128 (#146945)
|
||||
- install manpage
|
||||
* Wed Jan 25 2006 - mls@suse.de
|
||||
- converted neededforbuild to BuildRequires
|
||||
* Mon Oct 31 2005 - dmueller@suse.de
|
||||
- don't build as root
|
||||
* Fri Sep 02 2005 - ro@suse.de
|
||||
- rcscript: ignore on machines with < 2 CPUs
|
||||
* Tue Jun 21 2005 - ro@suse.de
|
||||
- build with fPIE/pie
|
||||
* Mon Feb 16 2004 - sf@suse.de
|
||||
- update to 0.09
|
||||
* Sat Sep 20 2003 - kukuk@suse.de
|
||||
- Add PreRequires for insserv
|
||||
* Thu Sep 04 2003 - ro@suse.de
|
||||
- added stop_on_removal and restart_on_update
|
||||
- changed insserv_and_fillup to insserv_force_if_yast
|
||||
* Thu Sep 04 2003 - sf@suse.de
|
||||
- added %%insserv_and_fillup in %%post
|
||||
and %%insserv_cleanup in %%postun
|
||||
* Thu Sep 04 2003 - ak@suse.de
|
||||
- update to version 0.6
|
||||
- Clean up init script a bit
|
||||
- Move initscript outside tar and mark as source
|
||||
* Fri Mar 21 2003 - sf@suse.de
|
||||
- initial version 0.1
|
Loading…
x
Reference in New Issue
Block a user