diff options
author | Bitao Hu <[email protected]> | 2024-04-11 15:41:32 +0800 |
---|---|---|
committer | Thomas Gleixner <[email protected]> | 2024-04-12 17:08:05 +0200 |
commit | 25a4a015118037809c97d089d69e927737e589e1 (patch) | |
tree | 08f068eb3cdf341741c41672ee78adcfcbfef726 /tools/perf/scripts/python/sctop.py | |
parent | 99cf63c56661be0a0c42f79b56f37a4aa34b4779 (diff) |
genirq: Avoid summation loops for /proc/interrupts
show_interrupts() unconditionally accumulates the per CPU interrupt
statistics to determine whether an interrupt was ever raised.
This can be avoided for all interrupts which are not strictly per CPU
and not of type NMI because those interrupts provide already an
accumulated counter. The required logic is already implemented in
kstat_irqs().
Split the inner access logic out of kstat_irqs() and use it for
kstat_irqs() and show_interrupts() to avoid the accumulation loop
when possible.
Originally-by: Thomas Gleixner <[email protected]>
Signed-off-by: Bitao Hu <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Liu Song <[email protected]>
Reviewed-by: Douglas Anderson <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/sctop.py')
0 files changed, 0 insertions, 0 deletions