914ea28980
- Fixes SIGFPE crash for some banning configuration (bz849792) - Fixes affinity_hint values processing (bz832815) - Adds banirq and bansript options (bz837049) - imake isn't needed for building any more (bz844359) - Fixes clogging of syslog (bz837646) - Added IRQBALANCE_ARGS variable for passing arguments via systemd(bz837048) - Fixes --hint-policy=subset behavior (bz844381)
45 lines
1.3 KiB
Diff
45 lines
1.3 KiB
Diff
From 718561bc79c095909f0c9d3fb2f0c1c163478b1e Mon Sep 17 00:00:00 2001
|
|
From: Petr Holasek <pholasek@redhat.com>
|
|
Date: Mon, 20 Feb 2012 16:59:05 +0100
|
|
Subject: [PATCH 3/8] When IRQBALANCE_BANNED_CPUS is set, /proc/stat is not
|
|
parsed properly.
|
|
|
|
proc stats counts all the cpus in /proc/stat, but compares that number to the
|
|
value in get_cpu_count(), which returns the number of cpus actively being
|
|
balanced. Since that value doesn't include banned cpus, its incorrect. Since
|
|
we don't want to measure the load on banned cpus anyway, just skip those lines
|
|
so cpucount doesn't increment and the count remains equal.
|
|
|
|
Signed-off-by: Petr Holasek <pholasek@redhat.com>
|
|
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
|
|
---
|
|
procinterrupts.c | 5 +++++
|
|
1 file changed, 5 insertions(+)
|
|
|
|
diff --git a/procinterrupts.c b/procinterrupts.c
|
|
index 4d3b07b..c032caf 100644
|
|
--- a/procinterrupts.c
|
|
+++ b/procinterrupts.c
|
|
@@ -32,6 +32,8 @@
|
|
|
|
#define LINESIZE 4096
|
|
|
|
+extern cpumask_t banned_cpus;
|
|
+
|
|
static int proc_int_has_msi = 0;
|
|
static int msi_found_in_sysfs = 0;
|
|
|
|
@@ -217,6 +219,9 @@ void parse_proc_stat(void)
|
|
|
|
cpunr = strtoul(&line[3], NULL, 10);
|
|
|
|
+ if (cpu_isset(cpunr, banned_cpus))
|
|
+ continue;
|
|
+
|
|
rc = sscanf(line, "%*s %*d %*d %*d %*d %*d %d %d", &irq_load, &softirq_load);
|
|
if (rc < 2)
|
|
break;
|
|
--
|
|
1.7.11.4
|
|
|