rpms/irqbalance/FC-5 irqbalance.init, 1.3, 1.4 irqbalance.spec, 1.26, 1.27 irqbalance.sysconfig, 1.1, 1.2 sources, 1.2, 1.3

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Fri May 25 13:08:48 UTC 2007


Author: nhorman

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

Modified Files:
	irqbalance.init irqbalance.spec irqbalance.sysconfig sources 
Log Message:
Updating to latest irqbalance


Index: irqbalance.init
===================================================================
RCS file: /cvs/dist/rpms/irqbalance/FC-5/irqbalance.init,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- irqbalance.init	19 Sep 2006 12:08:12 -0000	1.3
+++ irqbalance.init	25 May 2007 13:08:45 -0000	1.4
@@ -14,6 +14,101 @@
 # Source function library.
 . /etc/init.d/functions
 
+#internal functions
+set_isolcpu_affinity_mask() {
+
+#the isolcpu line in the kenrel is of the format:
+#[<cpunum>[-cpunum],]+
+	local mask
+	local tmp_mask;
+	local range
+	local range_high
+	local range_low
+	local space_list
+	local cpus
+	local chunk_mask
+	local temp_mask
+
+	grep isolcpus /proc/cmdline > /dev/null
+	if [ $? != 0 ]
+	then
+		# no isolcpus line
+		IRQ_AFFINITY_MASK=
+		return
+	fi
+
+	# get a space separated list of ranges
+	space_list=`sed -e's/\(^.*isolcpus=\)\([^ ]* *\)\(.*$\)/\2/' -e's/,/ /g' /proc/cmdline`
+
+	mask=0
+
+	for range in $space_list
+	do
+		# Get the Range
+		range_low=`echo $range | awk -F- '{print $1}'`	
+		range_high=`echo $range | awk -F- '{print $2}'`	
+
+		#
+		# If the High Range is not included
+		# its the same as te low range
+		#
+		if [ -z "$range_high" ]
+		then
+			range_high=$range_low
+		fi
+
+		cpus=`dc -e"$range_high $range_low - p"`
+
+		tmp_mask=0
+		#
+		# Build the number of 1's we need into the mask
+		#
+		for i in `seq 0 1 $cpus`
+		do
+			tmp_mask=`dc -e"2 $i ^ $tmp_mask + p"`
+		done
+
+		#
+		# And Shift the mask up to where it belongs
+		#
+		tmp_mask=`dc -e"2 $range_low ^ $tmp_mask * p"`
+
+		#
+		# Lastly, or the mask into the result mask with
+		# an add operation
+		#
+		mask=`dc -e"$mask $tmp_mask + p"`
+	done
+
+	#
+	# Convert the mask to a hex value
+	#
+	mask=`dc -e"10 i 16 o $mask p"`
+
+	#
+	# Now divide up the mask with commas since Arjan apparently didn't 
+	# feel the need to make this easy.
+	#
+	chunk_mask=""
+	temp_mask=$mask
+	while [ -n "$temp_mask" ]
+	do
+		new_chunk=`echo $temp_mask | cut -b1-8`
+		temp_mask=`echo $temp_mask | cut -b9-`
+		chunk_mask="$chunk_mask,$new_chunk"
+	done
+
+	# now strip the leading comma
+	chunk_mask=`echo $chunk_mask | sed -e's/,//'`
+
+	#
+	# Now Assign the mask value to the IRQ_AFFINITY_MASK
+	#
+	IRQ_AFFINITY_MASK=$chunk_mask 
+		
+}
+
+
 # Check that we're a priviledged user
 [ `id -u` = 0 ] || exit 0
 
@@ -40,15 +135,37 @@
 	*) ONESHOT= ;;
 esac
 
+#
+# Check to see if our IRQ_AFFINITY_MASK needs to be computed from 
+# the isolcpus command line options
+#
+if [ "$FOLLOW_ISOLCPUS" == "yes" ]
+then
+	set_isolcpu_affinity_mask
+fi
+
 RETVAL=0
 
 start() {
+        if [ -n "$ONESHOT" -a -f /var/lock/irqbalance ]; then
+                exit 0
+        fi
         echo -n $"Starting $prog: "
-        daemon irqbalance $ONESHOT
+	if [ -n "$IRQ_AFFINITY_MASK" ];
+	then
+		export IRQBALANCE_BANNED_CPUS=$IRQ_AFFINITY_MASK
+	fi 	
+        daemon irqbalance $ONESHOT $IRQ_AFFINITY
         RETVAL=$?
         echo
-        [ $RETVAL -eq 0 -a -z "$ONESHOT" ] && touch /var/lock/subsys/irqbalance
-	return $RETVAL
+        if [ $RETVAL -eq 0 ]; then
+                if [ -n "$ONESHOT" ]; then
+                        touch /var/lock/subsys/irqbalance
+                else
+                        touch /var/lock/irqbalance
+                fi
+        fi
+        return $RETVAL
 }
 
 
@@ -86,6 +203,7 @@
   *)
 	echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
 	exit 1
+	;;
 esac
 
 exit $?


Index: irqbalance.spec
===================================================================
RCS file: /cvs/dist/rpms/irqbalance/FC-5/irqbalance.spec,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- irqbalance.spec	19 Sep 2006 12:08:12 -0000	1.26
+++ irqbalance.spec	25 May 2007 13:08:45 -0000	1.27
@@ -1,19 +1,21 @@
 Summary:        IRQ balancing daemon.
 Name:           irqbalance
-Version:        1.12
-Release: %(R="$Revision$"; RR="${R##: }"; echo ${RR%%?})
-Epoch:		1
+Version:        0.55 
+Release: 	4%{?dist}
+Epoch:		2	
 Group:          System Environment/Base
 License:        GPL/OSL
-Source0:	irqbalance-0.12.tar.gz
+Source0:	http://www.irqbalance.org/releases/irqbalance-%{version}.tar.gz	
 Source1:	irqbalance.init
 Source2:	irqbalance.sysconfig
+Source3:	irqbalance.1
 Buildroot:      %{_tmppath}/%{name}-%{version}-root
 Prereq:		/sbin/chkconfig /sbin/service
-Patch1: irqbalance-pie.patch
-Patch2: irqbalance-norebalance-zeroints.patch
+
 ExclusiveArch:	i386 x86_64 ia64 ppc ppc64
 Obsoletes:	kernel-utils
+BuildRequires:	glib2-devel pkgconfig imake
+Requires:	glib2
 
 %description
 irqbalance is a daemon that evenly distributes IRQ load across
@@ -21,8 +23,6 @@
 
 %prep
 %setup -q -c -a 0
-%patch1 -p1
-%patch2 -p1
 
 %build
 rm -rf $RPM_BUILD_ROOT
@@ -32,17 +32,17 @@
 mkdir -p %{buildroot}/etc/rc.d/init.d
 mkdir -p %{buildroot}/etc/sysconfig
 
-cd irqbalance
-make CFLAGS="$RPM_OPT_FLAGS -fpie -pie"
+cd irqbalance-%{version}
+make 
 
 %install
 mkdir -p %{buildroot}/usr/share/man/man{1,8}
 
-cd irqbalance
+cd irqbalance-%{version}
 install irqbalance  %{buildroot}/usr/sbin
 install %{SOURCE1} %{buildroot}/etc/rc.d/init.d/irqbalance
 install %{SOURCE2} %{buildroot}/etc/sysconfig/irqbalance
-install irqbalance.1 %{buildroot}/usr/share/man/man1/
+install %{SOURCE3} %{buildroot}/usr/share/man/man1/
 
 chmod -R a-s %{buildroot}
 
@@ -52,8 +52,8 @@
 %files
 %defattr(-,root,root)
 /usr/sbin/irqbalance
-%attr(0644,root,root) %{_mandir}/*/*
 /etc/rc.d/init.d/irqbalance
+%attr(0644,root,root) %{_mandir}/*/*
 %attr(0644,root,root) /etc/sysconfig/irqbalance
 
 %preun
@@ -70,9 +70,55 @@
 
 
 %changelog
-* Tue Sep 19 2006 Neil Horman <nhorman at redhat.com>
-- Fix oneshot to not restart on every new runlevel
- 
+* Fri May 25 2007 Neil Horman <nhorman at redhat.com> - 0.55-4
+- Import devel irqbalance to FC-5
+
+* Thu May 17 2007 Neil Horman <nhorman at redhat.com> - 0.55-3
+- Adding FOLLOW_ISOLCPUS option (bz 237885)
+
+* Tue Dec 12 2006 Neil Horman <nhorman at redhat.com> - 0.55-2
+- Fixing typos in spec file (bz 219301)
+
+* Tue Dec 12 2006 Neil Horman <nhorman at redhat.com> - 0.55-1
+- Updating to version 0.55
+
+* Mon Dec 11 2006 Neil Horman <nhorman at redhat.com> - 0.54-1
+- Update irqbalance to new version released at www.irqbalance.org
+
+* Wed Nov 15 2006 Neil Horman <nhorman at redhat.com> - 1.13-8
+- Add ability to set default affinity mask (bz 211148)
+
+* 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
+
+* Tue Oct 17 2006 Neil Horman <nhorman at redhat.com> - 1.13-5
+- Making oneshot mean oneshot always (bz 211178)
+
+* Wed Sep 13 2006 Peter Jones <pjones at redhat.com> - 1.13-4
+- Fix subsystem locking
+
+* Fri Aug 18 2006 Jesse Keating <jkeating at redhat.com> - 1.13-2
+- rebuilt with latest binutils to pick up 64K -z commonpagesize on ppc*
+  (#203001)
+- Remove hack to use cvs checkin ID as release as it doesn't follow
+  packaging guidelines
+
+* Tue Aug 01 2006 Neil Horman <nhorman at redhat.com>
+- Change license to GPL in version 0.13
+
+* Sat Jul 29 2006 Dave Jones <davej at redhat.com>
+- identify a bunch more classes.
+
+* Fri Jul 14 2006 Jesse Keating <jkeating at redhat.com>
+- rebuild
+
+* Tue Jul 11 2006 Dave Jones <davej at redhat.com>
+- Further lazy rebalancing tweaks.
+
 * Sun Feb 26 2006 Dave Jones <davej at redhat.com>
 - Don't rebalance IRQs where no interrupts have occured.
 


Index: irqbalance.sysconfig
===================================================================
RCS file: /cvs/dist/rpms/irqbalance/FC-5/irqbalance.sysconfig,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- irqbalance.sysconfig	7 Jan 2005 05:58:43 -0000	1.1
+++ irqbalance.sysconfig	25 May 2007 13:08:45 -0000	1.2
@@ -7,3 +7,21 @@
 #    load and balance it once; after balancing exit and do not change
 #    it again.
 ONESHOT=
+
+#
+# IRQ_AFFINITY_MASK
+#    64 bit bitmask which allows you to indicate which cpu's should
+#    be skipped when reblancing irqs.  Cpu numbers which have their 
+#    corresponding bits set to zero in this mask will not have any
+#    irq's assigned to them on rebalance
+#
+#IRQ_AFFINITY_MASK=
+
+#
+# FOLLOW_ISOLCPUS
+#	Boolean value.  When set to yes, any setting of IRQ_AFFINITY_MASK above
+#	is overridden, and instead computed to be the same mask that is defined
+#	by the isolcpu kernel command line option.  
+#
+#FOLLOW_ISOLCPUS=no
+#


Index: sources
===================================================================
RCS file: /cvs/dist/rpms/irqbalance/FC-5/sources,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- sources	7 Jan 2005 05:58:43 -0000	1.2
+++ sources	25 May 2007 13:08:45 -0000	1.3
@@ -1 +1 @@
-1f225b73a01380955231b77d9be60c7a  irqbalance-0.12.tar.gz
+9f6b314ff1fdc14173abeb40592d4edf  irqbalance-0.55.tar.gz




More information about the fedora-cvs-commits mailing list