Re: [patch V6 00/16] Improve /proc/interrupts further
From: Thomas Gleixner
Date: Wed May 20 2026 - 11:42:16 EST
Shrikanth!
On Wed, May 20 2026 at 02:48, Shrikanth Hegde wrote:
> On 5/18/26 1:31 AM, Thomas Gleixner wrote:
>
> Ran perf stat -r 1000 cat /proc/interrupts > tmp.txt
> and Observed minimal improvement with series.
Can you redirect it to /dev/null instead to take the file operations out
of the picture?
> Base:
> 1,313,263 cycles:HG # 4.063 GHz ( +- 0.17% )
> 2,172,511 instructions:HG # 1.65 insn per cycle ( +- 0.05% )
> v6 series:
> 1,224,666 cycles:HG # 4.058 GHz ( +- 0.25% )
> 1,667,435 instructions:HG # 1.36 insn per cycle ( +- 0.08% )
Interesting. The number of instructions goes down by 20+%, but at the
same time IPC drops too.
> Looking at powerpc arch_show_interrupts,
> It could use the similar set of optimizations.
> - move to array based
> - use irq_proc_emit_counts
> - some interrupts such as machine check, is hardly set. set skip_vector.
>
>
> Copilot suggested below diff to quickly try irq_proc_emit_counts integration.
> It showed little gains compared to v6. So it maybe worth fixing that in the
> right way. (similar to x86 stuff you have done)
>
> Performance counter stats for 'cat /proc/interrupts' (1000 runs):
>
> 0.29 msec task-clock:HG # 0.586 CPUs utilized ( +- 0.22% )
> 0 context-switches:HG # 0.000 /sec
> 0 cpu-migrations:HG # 0.000 /sec
> 44 page-faults:HG # 153.067 K/sec ( +- 0.03% )
> 1,166,567 cycles:HG # 4.058 GHz ( +- 0.22% )
> 1,475,365 instructions:HG # 1.26 insn per cycle ( +- 0.09% )
> 249,051 branches:HG # 866.397 M/sec ( +- 0.10% )
> 5,104 branch-misses:HG # 2.05% of all branches ( +- 0.33% )
>
> 0.000490211 +- 0.000000992 seconds time elapsed ( +- 0.20% ) <<< 3-4% improvements.
Again IPC drops ....