Skip to content

Commit f7e6746

Browse files
Russell KingIngo Molnar
authored andcommitted
sched/accounting, proc: Fix /proc/stat interrupts sum
Commit 3292beb ("sched/accounting: Change cpustat fields to an array") deleted the code which provides us with the sum of all interrupts in the system, causing vmstat to report zero interrupts occuring in the system. Fix this by restoring the code. Signed-off-by: Russell King <[email protected]> Tested-by: Russell King <[email protected]> # [on ARM] Tested-by: Tony Luck <[email protected]> Tested-by: Steven Rostedt <[email protected]> Cc: Glauber Costa <[email protected]> Cc: KAMEZAWA Hiroyuki <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Paul Tuner <[email protected]> Cc: Peter Zijlstra <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
1 parent bced76a commit f7e6746

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fs/proc/stat.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ static int show_stat(struct seq_file *p, void *v)
7777
steal += kcpustat_cpu(i).cpustat[CPUTIME_STEAL];
7878
guest += kcpustat_cpu(i).cpustat[CPUTIME_GUEST];
7979
guest_nice += kcpustat_cpu(i).cpustat[CPUTIME_GUEST_NICE];
80+
sum += kstat_cpu_irqs_sum(i);
81+
sum += arch_irq_stat_cpu(i);
8082

8183
for (j = 0; j < NR_SOFTIRQS; j++) {
8284
unsigned int softirq_stat = kstat_softirqs_cpu(j, i);

0 commit comments

Comments
 (0)