Import __bitmap_parselist from the Linux kernel, in order to parse
CPU ranges as used in eg. the kernel isolcpus= commandline argument.
This code appears to have been in the Linux kernel since the initial
git import in 2005, so I do not have attribution of which changeset(s)
introduced it into the kernel.
Signed-off-by: Rik van Riel <riel@redhat.com>
Fix incorrect code in bitmap_scnprintf that could cause it to give truncated
output when nmaskbits > 32 and nmaskbits % 32 != 0. In practice this problem
was never encountered because NR_CPUS % 32 == 0. So this change fixes the
code for the sake of correctness even though the bug did not actually cause a
real problem.
Theres a problem with the affintiy_hint code. Specifically it fails to
determine when an affinity_hint file is all f's (affinity_hint == all cpus). As
such, irqbalance is currently allowing all cpus to handle all irqs, which is the
antithesis of its function. It also makes use of cpus_full, which is poorly
formed, as it assumes that the affinity_hint mask is always NR_CPUS in length,
and each bit is set (even for those cpus not actually present in the system).
This patch corrects both of those problems, by only checking all the present
cpus in the system in the mask, and detecting when that mask is all f's.
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
git-svn-id: https://irqbalance.googlecode.com/svn/trunk@30 46b42954-3823-0410-bd82-eb80b452c9b5
correctly. Without this fix, the output buffer remains unititialized in this
case
Authored-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
git-svn-id: https://irqbalance.googlecode.com/svn/trunk@26 46b42954-3823-0410-bd82-eb80b452c9b5
Steve Grubb sent this patch as part of issue 3:
http://code.google.com/p/irqbalance/issues/detail?id=3
He requested that we add the ability to drop capabilities from irqbalance since
it nominally runs as root, and he suggested using the capng library, which makes
that process easier. Since capng is a fairly new library, and many distros may
not have it, we need to start using a configure script to optionally include it
during the build. This patch accomplishes all of that.
Signed-off-by: Neil Horman <nhorman@gmail.com>
git-svn-id: https://irqbalance.googlecode.com/svn/trunk@21 46b42954-3823-0410-bd82-eb80b452c9b5