diff --git a/irq_balancer b/irq_balancer index 2ff0c79..7babd3f 100644 --- a/irq_balancer +++ b/irq_balancer @@ -9,9 +9,9 @@ ### BEGIN INIT INFO # Provides: irqbalance # Required-Start: $remote_fs -# X-UnitedLinux-Should-Start: +# Should-Start: # Required-Stop: -# X-UnitedLinux-Should-Stop: +# Should-Stop: # Default-Start: 1 2 3 5 # Default-Stop: 0 6 # Short-Description: irqbalance daemon providing irq balancing on MP-machines @@ -29,6 +29,19 @@ test -x $IRQBALANCE_BIN || exit 5 PROC=$(grep -c '^processor' /proc/cpuinfo) . /etc/rc.status +. /etc/sysconfig/irqbalance + +if [ -n "$IRQBALANCE_BANNED_CPUS" ] ; then + export IRQBALANCE_BANNED_CPUS +fi + +if [ "$IRQBALANCE_ONESHOT" != "auto" ] ; then + export IRQBALANCE_ONESHOT +fi + +if [ -n "$IRQBALANCE_BANNED_INTERRUPTS" ] ; then + export IRQBALANCE_BANNED_INTERRUPTS +fi # Reset status of this service rc_reset diff --git a/irqbalance.changes b/irqbalance.changes index 929e672..060aeb0 100644 --- a/irqbalance.changes +++ b/irqbalance.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Dec 11 22:49:59 CET 2007 - bwalle@suse.de + +- add /etc/sysconfig/irqbalance configuration file for + IRQBALANCE_ONESHOT, IRQBALANCE_BANNED_CPUS and + IRQBALANCE_BANNED_INTERRUPTS configuration (#342593) +- fix some minor rpmlint warnings + ------------------------------------------------------------------- Thu Apr 26 20:53:45 CEST 2007 - bwalle@suse.de diff --git a/irqbalance.spec b/irqbalance.spec index 331ebcb..52abd8e 100644 --- a/irqbalance.spec +++ b/irqbalance.spec @@ -11,17 +11,19 @@ # norootforbuild Name: irqbalance -License: GNU General Public License (GPL) +License: GPL v2 or later Group: System/Daemons -Autoreqprov: on +AutoReqProv: on PreReq: %insserv_prereq Version: 0.55 -Release: 5 +Release: 54 Summary: Balance IRQs on SMP Machines Source: %{name}-%{version}.tar.bz2 Source1: irqbalance.pod Source2: irq_balancer -URL: http://www.irqbalance.org +Source3: sysconfig.irqbalance +Url: http://www.irqbalance.org +PreReq: coreutils fillup BuildRoot: %{_tmppath}/%{name}-%{version}-build # xorg-x11-util-devel is for gccmakedep BuildRequires: glib2-devel perl xorg-x11-util-devel @@ -44,6 +46,7 @@ Authors: %build make CFLAGS="$RPM_OPT_FLAGS -fPIE -pie" cp %{SOURCE1} . +cp %{SOURCE3} . pod2man --release=0.5.5 --center=irqbalance irqbalance.pod irqbalance.1 gzip irqbalance.1 @@ -55,6 +58,8 @@ install -m 0755 $RPM_SOURCE_DIR/irq_balancer $RPM_BUILD_ROOT/etc/init.d ln -s /etc/init.d/irq_balancer $RPM_BUILD_ROOT/%{_sbindir}/rcirq_balancer mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1 install -m 0644 irqbalance.1.gz $RPM_BUILD_ROOT/%{_mandir}/man1 +mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates/ +install -m 0644 sysconfig.irqbalance $RPM_BUILD_ROOT/var/adm/fillup-templates/ %clean rm -rf $RPM_BUILD_ROOT @@ -64,6 +69,7 @@ rm -rf $RPM_BUILD_ROOT %post %insserv_force_if_yast irq_balancer +%{fillup_only} %postun %restart_on_update irq_balancer @@ -75,8 +81,14 @@ rm -rf $RPM_BUILD_ROOT /etc/init.d/irq_balancer %{_sbindir}/rcirq_balancer %{_mandir}/man1/irqbalance.1.gz +/var/adm/fillup-templates/sysconfig.irqbalance %changelog +* Tue Dec 11 2007 - bwalle@suse.de +- add /etc/sysconfig/irqbalance configuration file for + IRQBALANCE_ONESHOT, IRQBALANCE_BANNED_CPUS and + IRQBALANCE_BANNED_INTERRUPTS configuration (#342593) +- fix some minor rpmlint warnings * Thu Apr 26 2007 - bwalle@suse.de - remove special handling of timer interrupt and dual core systems from init script because the new irq balancer does diff --git a/sysconfig.irqbalance b/sysconfig.irqbalance new file mode 100644 index 0000000..9012983 --- /dev/null +++ b/sysconfig.irqbalance @@ -0,0 +1,33 @@ +## Path: System/Kernel/IRQ Balancing +## Description: IRQ Balancing configuration + +## Type: string +## Default: "" +## ServiceRestart: irq_balancer +# +# Bitmap of CPUs that are banned from IRQ balancing +# +IRQBALANCE_BANNED_CPUS="" + +## Type: list(auto,enabled) +## Default: auto +## ServiceRestart: Iirq_balancer +# +# Instead of running as daemon, the IRQ balancer just does a setup +# once and then exits. "auto" is the default behaviour which means that +# one socket but multi core CPUs get a oneshot setup. "enabled" always +# enables oneshot mode, regardless of the CPUs. +# +IRQBALANCE_ONESHOT=auto + +## Type: string +## Default: "" +## ServiceRestart: Iirq_balancer +# +# Interrupt that don't get balanced as list (separation character doesn't +# matter). For example broken chipsets don't allow the timer interrupt +# to be set to another CPU than the first, and with this option that +# policy can be applied. +# +IRQBALANCE_BANNED_INTERRUPTS="" +