Re: [PATCH 01/13] kernel/irq/proc: use seq_put_decimal_ull_width() for decimal values

From: Thomas Gleixner
Date: Wed Nov 13 2024 - 14:10:06 EST


On Sat, Nov 09 2024 at 00:07, David Wang wrote:
> The improvement has pratical significance, considering many monitoring
> tools would read /proc/interrupts periodically.

I've applied this, but ...

looking at a 256 CPU machine. /proc/interrupts provides data for 560
interrupts, which amounts to ~1.6MB data size.

There are 560 * 256 = 143360 interrupt count fields. 140615 of these
fields are zero, which means 140615 * 11 bytes. That's 96% of the
overall data size. The actually useful information is less than
50KB if properly condensed.

I'm really amused that people spend a lot of time to improve the
performance of /proc/interrupts instead of actually sitting down and
implementing a proper new interface for this purpose, which would make
both the kernel and the tools faster by probably several orders of
magnitude.

Thanks,

tglx