From: Mike Frysinger Date: Tue, 9 Jan 2007 04:13:34 +0000 (+0000) Subject: Abort loading on uniproc/dualcore machines. Only want to run on real SMP machines. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1c6053df94fb37c8e922b27f3de7277de083297e;p=gentoo.git Abort loading on uniproc/dualcore machines. Only want to run on real SMP machines. Package-Manager: portage-2.1.2_rc4-r7 --- diff --git a/sys-apps/irqbalance/ChangeLog b/sys-apps/irqbalance/ChangeLog index 2e605a0fde2c..abcc4e70fd80 100644 --- a/sys-apps/irqbalance/ChangeLog +++ b/sys-apps/irqbalance/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for sys-apps/irqbalance # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/irqbalance/ChangeLog,v 1.14 2007/01/09 02:28:22 ticho Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/irqbalance/ChangeLog,v 1.15 2007/01/09 04:13:34 vapier Exp $ + + 09 Jan 2007; Mike Frysinger files/irqbalance.init: + Abort loading on uniproc/dualcore machines. Only want to run on real SMP + machines. 09 Jan 2007; Andrej Kacian irqbalance-0.55.ebuild: Stable on x86, bug #160983. diff --git a/sys-apps/irqbalance/Manifest b/sys-apps/irqbalance/Manifest index 3211fece11d5..53de82590510 100644 --- a/sys-apps/irqbalance/Manifest +++ b/sys-apps/irqbalance/Manifest @@ -5,10 +5,10 @@ AUX irqbalance-0.55-build.patch 855 RMD160 3908e87bbbb673aa1ccc9b0be1ba261b96083 MD5 3264033f7ac988657a213d06763a8ea5 files/irqbalance-0.55-build.patch 855 RMD160 3908e87bbbb673aa1ccc9b0be1ba261b960831cc files/irqbalance-0.55-build.patch 855 SHA256 ddbc077d45137fec1497aa6fb3a0bb60d5af8c76721c59446acf53a17b4a57e2 files/irqbalance-0.55-build.patch 855 -AUX irqbalance.init 587 RMD160 1144755ae4a25baa58f5266ff080b4cfa1b914eb SHA1 54409c96e6d1722ae464a7443b7b075b37ff3621 SHA256 64bba06d992220cf14f4537715fcfdef9c6c2c026c5f49baad788a704495e75a -MD5 4c5114d0be4faee20bb67c135a9ff874 files/irqbalance.init 587 -RMD160 1144755ae4a25baa58f5266ff080b4cfa1b914eb files/irqbalance.init 587 -SHA256 64bba06d992220cf14f4537715fcfdef9c6c2c026c5f49baad788a704495e75a files/irqbalance.init 587 +AUX irqbalance.init 1223 RMD160 846c6fd887ea412b66f37bee24f8f50570586b37 SHA1 7534881f20b9e2b0b746d62ccbcaf75998aee5eb SHA256 e0ae2e3bddcc5d46b2c7c981f8bb3381c4227c8a142bb3dc75c815450ca28c66 +MD5 30846e037327c63a37a560e42265799a files/irqbalance.init 1223 +RMD160 846c6fd887ea412b66f37bee24f8f50570586b37 files/irqbalance.init 1223 +SHA256 e0ae2e3bddcc5d46b2c7c981f8bb3381c4227c8a142bb3dc75c815450ca28c66 files/irqbalance.init 1223 DIST irqbalance-0.12.tar.gz 10899 RMD160 d3ad35fb10cde5687577a23f7df85a92afabee64 SHA1 ac9c810f5acb5b84cb929158bc58e7378f7e0044 SHA256 a718012d43de9b635289b13482621919411a3f5e0decfb8b02124c064734f225 DIST irqbalance-0.55.tar.gz 20637 RMD160 099b9bb1c6774f518b967c2cbbd418812f2f576c SHA1 9073e1dbb48e7c7bf1f4850e988d8f74e8a35761 SHA256 489955ea58b713f5d7aaa23752818270a4834b4f09d121bd78a4e5509e359f01 EBUILD irqbalance-0.12-r1.ebuild 896 RMD160 df4558803ce44fe87dc814d54a5a93340cf401cf SHA1 2c3913bef660cd83e0071d8196122a177d0d524f SHA256 25327dd9ced10432c4595a89fee93e29b7defb7f3b01c04e423162b8fe518e31 @@ -19,10 +19,10 @@ EBUILD irqbalance-0.55.ebuild 717 RMD160 2fa8219ac31a27407071a88f03cbd606c605773 MD5 8a0c8ac007ef63ed59138d50c8da3782 irqbalance-0.55.ebuild 717 RMD160 2fa8219ac31a27407071a88f03cbd606c6057733 irqbalance-0.55.ebuild 717 SHA256 0535714bb11ff995c382c06ae4972df4cf95551ecce18e26a3a73489075e802a irqbalance-0.55.ebuild 717 -MISC ChangeLog 2157 RMD160 64961a96326850d1903d90c86f46676c3fea1f77 SHA1 c8da1a60ad5b2738c4d06d8ed90246d2b90bce51 SHA256 c4ef1ae4626e88833bdfc39b2feb0da2943ff2a3fac91dd2a532219e9ec1a7e9 -MD5 5f0fcd42630b1e9736c2da9d2bea64dd ChangeLog 2157 -RMD160 64961a96326850d1903d90c86f46676c3fea1f77 ChangeLog 2157 -SHA256 c4ef1ae4626e88833bdfc39b2feb0da2943ff2a3fac91dd2a532219e9ec1a7e9 ChangeLog 2157 +MISC ChangeLog 2319 RMD160 8d8254dbbb4237515e315b2a68fcbd7328991bbc SHA1 9cff29afdb5d4b9268cea12939f9ebad513d6a18 SHA256 c7d94dea7eadbfae8bf10ea445553b611e47b9f18da133729e16c44f59728f3a +MD5 aa6f5c0adfc06e683c50ede6e24cfbd2 ChangeLog 2319 +RMD160 8d8254dbbb4237515e315b2a68fcbd7328991bbc ChangeLog 2319 +SHA256 c7d94dea7eadbfae8bf10ea445553b611e47b9f18da133729e16c44f59728f3a ChangeLog 2319 MISC metadata.xml 164 RMD160 f43cbec30b7074319087c9acffdb9354b17b0db3 SHA1 9c213f5803676c56439df3716be07d6692588856 SHA256 f5f2891f2a4791cd31350bb2bb572131ad7235cd0eeb124c9912c187ac10ce92 MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164 RMD160 f43cbec30b7074319087c9acffdb9354b17b0db3 metadata.xml 164 @@ -34,9 +34,9 @@ MD5 e17bde8e2c09c17882a506ed32fac117 files/digest-irqbalance-0.55 244 RMD160 084ce38c4b324bb6e059ab40095922d1232ce856 files/digest-irqbalance-0.55 244 SHA256 649ed38002f6f4193d5249918cdf794d694c23f65b92b64edece4125c9eeab95 files/digest-irqbalance-0.55 244 -----BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.6 (GNU/Linux) +Version: GnuPG v2.0.1 (GNU/Linux) -iD8DBQFFov3QQlM6RnzZP+IRAhp6AKCWNkNEn+02+vKBOMpkDiJijaHEswCgw3Cj -mt4x9BPtERSAcEYiGgqdJsc= -=loyv +iD8DBQFFoxaG8bi6rjpTunYRAsK4AJ4voAgOAa21V/NwktMEJQrofLoPRACdFMCT +9whbfUqnUrs5BK4VKh46aK8= +=d2mc -----END PGP SIGNATURE----- diff --git a/sys-apps/irqbalance/files/irqbalance.init b/sys-apps/irqbalance/files/irqbalance.init index 1a9eb1900efc..f311b2c22569 100755 --- a/sys-apps/irqbalance/files/irqbalance.init +++ b/sys-apps/irqbalance/files/irqbalance.init @@ -1,14 +1,31 @@ #!/sbin/runscript -# Copyright 1999-2004 Gentoo Foundation +# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License, v2 or later -# $Header: /var/cvsroot/gentoo-x86/sys-apps/irqbalance/files/irqbalance.init,v 1.1 2006/08/22 15:03:47 uberlord Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/irqbalance/files/irqbalance.init,v 1.2 2007/01/09 04:13:34 vapier Exp $ depend() { need localmount after bootmisc } +checkconfig() { + # irqbalance only makes sense to run on smp machines + # where each cpu has its own cache ... so if you're + # just running a dual core machine, you've got shared + # cache, so we'll abort here. + local physical_ids=$(grep -s '^physical id[[:space:]]*:' /proc/cpuinfo | sort -u | wc -l) + [[ ${physical_ids} -gt 1 ]] && return 0 + [[ ${physical_ids} -eq 1 ]] && return 1 + local processors=$(grep -s '^processor[[:space:]]*:' /proc/cpuinfo | sort -u | wc -l) + [[ ${processors} -gt 1 ]] && return 0 +} + start() { + if ! checkconfig ; then + eerror "irqbalance: your machine lacks different physical processors; not enabling" + return 1 + fi + ebegin "Starting irqbalance" start-stop-daemon --start --exec /sbin/irqbalance \ --pidfile /var/run/irqbalance.pid