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

From: Thomas Gleixner

Date: Wed Apr 01 2026 - 15:39:27 EST


On Wed, Apr 01 2026 at 16:51, Dmitry Ilvokhin wrote:
> 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?

Yes. There should be a file which describes the indices on the machine.