Re: [patch V6 00/16] Improve /proc/interrupts further

From: Thomas Gleixner

Date: Thu May 21 2026 - 17:07:43 EST


On Thu, May 21 2026 at 20:18, Shrikanth Hegde wrote:
> On 5/21/26 1:23 PM, Thomas Gleixner wrote:
>> It doesn't add up completely, but the trend is there. And you can trick
>> perf to reveal the startup/teardown overhead it by comparing:
>>
>> perf stat -r 1000 head -q -c -0 /proc/interrupts >/dev/null
>> perf stat -r 1000 head -q -c 0 /proc/interrupts >/dev/null
>>
> Tried it, but doesn't affect much.

Weird. On a v6 patched kernel:

$ perf stat -r 1000 head -q -c -0 /proc/interrupts >/dev/null

0.00130456 +- 0.00000306 seconds time elapsed ( +- 0.23% )

$ perf stat -r 1000 head -q -c 0 /proc/interrupts >/dev/null

0.00108667 +- 0.00000367 seconds time elapsed ( +- 0.34% )

The -c -0 one reads the full output while the -c 0 one just opens the
file and closes it again, which means the actual read takes ~0.3ms while
the startup/teardown takes 1ms.

>> printf("%lu %lu %5.3f\n", tsum / LOOPS, rs / LOOPS, (std / mean) * 100.0);
>> return 0;
>> }
>
> This shows real benefits indeed.
>
> base v6 v6+ppc_hack
> 101us 65us 57us
>
> So doing a proper powerpc fix indeed would make sense.
> I think it is going to be similar. Let me go and read your
> series again.

Have fun!

> For the genirq bits of the series, consider the tag if applicable
>
> Tested-by: Shrikanth Hegde <sshegde@xxxxxxxxxxxxx>

Thank you!

tglx