Re: [patch v2 13/14] [RFC] genirq/proc: Provide architecture specific binary statistics

From: Dmitry Ilvokhin

Date: Wed Apr 01 2026 - 12:53:36 EST


On Fri, Mar 20, 2026 at 02:22:29PM +0100, Thomas Gleixner wrote:
> Provide a binary statistics interface similar to the per device and per CPU
> interfaces to access the architecture specific interrupt statistics.
>
> The architecture has to select it in Kconfig and provide an accessor to the
> per CPU interrupt information and the number of architecture specific
> entries.
>
> The entries are ordered by a numerical index starting from 0, which
> corresponds to the ordering of those interrupts in /proc/interrupt. The

This mapping is fragile. The IRQ_COUNT_* enum is kernel-internal,
config-dependent, and not exposed to userspace. Correlating indices to
names via /proc/interrupts line positions relies on both interfaces
skipping the same entries, which is not enforced.

Would it make sense to expose the short symbol name (e.g. "NMI", "LOC",
"TLB") alongside the index, or provide a companion file that lists them?