diff options
author | Paul E. McKenney <paulmck@kernel.org> | 2023-02-03 03:40:07 +0300 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2023-02-03 03:40:07 +0300 |
commit | bba8d3d17dc2678f9647962900aa421a18c25320 (patch) | |
tree | 6d174ba5d2e9210c79355991d06188bd4820382c /include | |
parent | 8e1704b6a8c91f37910f4d9957857f6d4424415c (diff) | |
parent | 84ec7c20363f46a4031695eceb0374c1c4d6b9ec (diff) | |
download | linux-bba8d3d17dc2678f9647962900aa421a18c25320.tar.xz |
Merge branch 'stall.2023.01.09a' into HEAD
stall.2023.01.09a: RCU CPU stall-warning updates.
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/kernel_stat.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h index ddb5a358fd82..9935f7ecbfb9 100644 --- a/include/linux/kernel_stat.h +++ b/include/linux/kernel_stat.h @@ -52,6 +52,7 @@ DECLARE_PER_CPU(struct kernel_cpustat, kernel_cpustat); #define kstat_cpu(cpu) per_cpu(kstat, cpu) #define kcpustat_cpu(cpu) per_cpu(kernel_cpustat, cpu) +extern unsigned long long nr_context_switches_cpu(int cpu); extern unsigned long long nr_context_switches(void); extern unsigned int kstat_irqs_cpu(unsigned int irq, int cpu); @@ -67,6 +68,17 @@ static inline unsigned int kstat_softirqs_cpu(unsigned int irq, int cpu) return kstat_cpu(cpu).softirqs[irq]; } +static inline unsigned int kstat_cpu_softirqs_sum(int cpu) +{ + int i; + unsigned int sum = 0; + + for (i = 0; i < NR_SOFTIRQS; i++) + sum += kstat_softirqs_cpu(i, cpu); + + return sum; +} + /* * Number of interrupts per specific IRQ source, since bootup */ @@ -75,7 +87,7 @@ extern unsigned int kstat_irqs_usr(unsigned int irq); /* * Number of interrupts per cpu, since bootup */ -static inline unsigned int kstat_cpu_irqs_sum(unsigned int cpu) +static inline unsigned long kstat_cpu_irqs_sum(unsigned int cpu) { return kstat_cpu(cpu).irqs_sum; } |