From: Thomas Gleixner <tglx@kernel.org>
To: Radu Rendec <radu@rendec.net>, LKML <linux-kernel@vger.kernel.org>
Cc: x86@kernel.org, Dmitry Ilvokhin <d@ilvokhin.com>,
Neil Horman <nhorman@tuxdriver.com>,
Florian Fainelli <florian.fainelli@broadcom.com>
Subject: Re: [patch v2 04/14] x86/irq: Make irqstats array based
Date: Tue, 24 Mar 2026 21:21:00 +0100 [thread overview]
Message-ID: <871ph9ges3.ffs@tglx> (raw)
In-Reply-To: <874im5gfzp.ffs@tglx>
On Tue, Mar 24 2026 at 20:54, Thomas Gleixner wrote:
> On Mon, Mar 23 2026 at 15:24, Radu Rendec wrote:
>> On Fri, 2026-03-20 at 14:21 +0100, Thomas Gleixner wrote:
>>> arch/x86/include/asm/hardirq.h | 69 +++++-----
>>
>> I believe this breaks scripts/gdb/linux/interrupts.py, particularly the
>> x86_show_irqstat() function, which still expects individual members in
>> struct irq_cpustat_t.
>
> Uurg. I did not even know this exists. Let me try to polish the snake.
Something like the below should work, now I have to figure out how to
test it.
----
--- a/scripts/gdb/linux/interrupts.py
+++ b/scripts/gdb/linux/interrupts.py
@@ -97,8 +97,8 @@ irq_desc_type = utils.CachedType("struct
text += "%*s: %10u\n" % (prec, "ERR", cnt['counter'])
return text
-def x86_show_irqstat(prec, pfx, field, desc):
- irq_stat = gdb.parse_and_eval("&irq_stat")
+def x86_show_irqstat(prec, pfx, idx, desc):
+ irq_stat = gdb.parse_and_eval("&irq_stat.counts[IRQ_COUNT_%s]" %idx)
text = "%*s: " % (prec, pfx)
for cpu in cpus.each_online_cpu():
stat = cpus.per_cpu(irq_stat, cpu)
@@ -118,32 +118,51 @@ irq_desc_type = utils.CachedType("struct
text = x86_show_irqstat(prec, "NMI", '__nmi_count', 'Non-maskable interrupts')
if constants.LX_CONFIG_X86_LOCAL_APIC:
- text += x86_show_irqstat(prec, "LOC", 'apic_timer_irqs', "Local timer interrupts")
- text += x86_show_irqstat(prec, "SPU", 'irq_spurious_count', "Spurious interrupts")
- text += x86_show_irqstat(prec, "PMI", 'apic_perf_irqs', "Performance monitoring interrupts")
- text += x86_show_irqstat(prec, "IWI", 'apic_irq_work_irqs', "IRQ work interrupts")
- text += x86_show_irqstat(prec, "RTR", 'icr_read_retry_count', "APIC ICR read retries")
+ text += x86_show_irqstat(prec, "LOC", 'APIC_TIMER', "Local timer interrupts")
+ text += x86_show_irqstat(prec, "SPU", 'SPURIOUS', "Spurious interrupts")
+ text += x86_show_irqstat(prec, "PMI", 'APIC_PERF', "Performance monitoring interrupts")
+ text += x86_show_irqstat(prec, "IWI", 'IRQ_WORK', "IRQ work interrupts")
+ text += x86_show_irqstat(prec, "RTR", 'ICR_READ_RETRY', "APIC ICR read retries")
if utils.gdb_eval_or_none("x86_platform_ipi_callback") is not None:
- text += x86_show_irqstat(prec, "PLT", 'x86_platform_ipis', "Platform interrupts")
+ text += x86_show_irqstat(prec, "PLT", 'X86_PLATFORM_IPI', "Platform interrupts")
if constants.LX_CONFIG_SMP:
- text += x86_show_irqstat(prec, "RES", 'irq_resched_count', "Rescheduling interrupts")
- text += x86_show_irqstat(prec, "CAL", 'irq_call_count', "Function call interrupts")
- text += x86_show_irqstat(prec, "TLB", 'irq_tlb_count', "TLB shootdowns")
+ text += x86_show_irqstat(prec, "RES", 'RESCHEDULE', "Rescheduling interrupts")
+ text += x86_show_irqstat(prec, "CAL", 'CALL_FUNCTION', "Function call interrupts")
+
+ text += x86_show_irqstat(prec, "TLB", 'TLB', "TLB shootdowns")
if constants.LX_CONFIG_X86_THERMAL_VECTOR:
- text += x86_show_irqstat(prec, "TRM", 'irq_thermal_count', "Thermal events interrupts")
+ text += x86_show_irqstat(prec, "TRM", 'THERMAL_APIC', "Thermal events interrupts")
if constants.LX_CONFIG_X86_MCE_THRESHOLD:
- text += x86_show_irqstat(prec, "THR", 'irq_threshold_count', "Threshold APIC interrupts")
+ text += x86_show_irqstat(prec, "THR", 'THRESHOLD_APIC', "Threshold APIC interrupts")
if constants.LX_CONFIG_X86_MCE_AMD:
- text += x86_show_irqstat(prec, "DFR", 'irq_deferred_error_count', "Deferred Error APIC interrupts")
+ text += x86_show_irqstat(prec, "DFR", 'DEFERRED_ERROR', "Deferred Error APIC interrupts")
if constants.LX_CONFIG_X86_MCE:
text += x86_show_mce(prec, "&mce_exception_count", "MCE", "Machine check exceptions")
text += x86_show_mce(prec, "&mce_poll_count", "MCP", "Machine check polls")
+ if constants.LX_CONFIG_X86_HV_CALLBACK_VECTOR:
+ text += x86_show_irqstat(prec, 'HYP', 'HYPERVISOR_CALLBACK', 'Hypervisor callback interrupts')
+
+ if constants.LX_CONFIG_HYPERV:
+ text += x86_show_irqstat(prec, 'HRE', 'HYPERV_REENLIGHTENMENT', 'Hyper-V reenlightenment interrupts')
+ text += x86_show_irqstat(prec, 'HVS', 'HYPERV_STIMER0', 'Hyper-V stimer0 interrupts')
+
+ if constants.LX_CONFIG_KVM:
+ text += x86_show_irqstat(prec, "PIN", 'POSTED_INTR', 'Posted-interrupt notification event')
+ text += x86_show_irqstat(prec, "NPI", 'POSTED_INTR_NESTED', 'Nested posted-interrupt event')
+ text += x86_show_irqstat(prec, "PIW", 'POSTED_INTR_WAKEUP', 'Posted-interrupt wakeup event')
+
+ if constants.LX_CONFIG_GUEST_PERF_EVENTS:
+ text += x86_show_irqstat(prec, "VPMI", 'PERF_GUEST_MEDIATED_PMI', 'Perf Guest Mediated PMI')
+
+ if constants.LX_CONFIG_X86_POSTED_MSI:
+ text += x86_show_irqstat(prec, "PIN", 'POSTED_MSI_NOTIFICATION', 'Posted MSI notification event')
+
text += show_irq_err_count(prec)
if constants.LX_CONFIG_X86_IO_APIC:
@@ -151,11 +170,6 @@ irq_desc_type = utils.CachedType("struct
if cnt is not None:
text += "%*s: %10u\n" % (prec, "MIS", cnt['counter'])
- if constants.LX_CONFIG_KVM:
- text += x86_show_irqstat(prec, "PIN", 'kvm_posted_intr_ipis', 'Posted-interrupt notification event')
- text += x86_show_irqstat(prec, "NPI", 'kvm_posted_intr_nested_ipis', 'Nested posted-interrupt event')
- text += x86_show_irqstat(prec, "PIW", 'kvm_posted_intr_wakeup_ipis', 'Posted-interrupt wakeup event')
-
return text
def arm_common_show_interrupts(prec):
next prev parent reply other threads:[~2026-03-24 20:21 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-20 13:21 [patch v2 00/14] Improve /proc/interrupts further and add a binary interface Thomas Gleixner
2026-03-20 13:21 ` [patch v2 01/14] x86/irq: Optimize interrupts decimals printing Thomas Gleixner
2026-03-21 16:10 ` Radu Rendec
2026-03-20 13:21 ` [patch v2 02/14] genirq/proc: Avoid formatting zero counts in /proc/interrupts Thomas Gleixner
2026-03-21 16:38 ` Radu Rendec
2026-03-20 13:21 ` [patch v2 03/14] genirq/proc: Utilize irq_desc::tot_count to avoid evaluation Thomas Gleixner
2026-03-22 19:59 ` Radu Rendec
2026-03-20 13:21 ` [patch v2 04/14] x86/irq: Make irqstats array based Thomas Gleixner
2026-03-20 16:39 ` Michael Kelley
2026-03-21 16:38 ` Thomas Gleixner
2026-03-21 20:32 ` Michael Kelley
2026-03-23 19:24 ` Radu Rendec
2026-03-24 19:54 ` Thomas Gleixner
2026-03-24 20:21 ` Thomas Gleixner [this message]
2026-03-24 20:32 ` Radu Rendec
2026-03-25 19:20 ` Radu Rendec
2026-03-25 22:52 ` Thomas Gleixner
2026-03-25 22:54 ` Florian Fainelli
2026-03-26 10:29 ` Thomas Gleixner
2026-03-26 23:00 ` Florian Fainelli
2026-03-27 11:03 ` Thomas Gleixner
2026-03-26 12:34 ` Radu Rendec
2026-03-20 13:21 ` [patch v2 05/14] genirq: Expose nr_irqs in core code Thomas Gleixner
2026-03-23 19:48 ` Radu Rendec
2026-03-23 21:27 ` Thomas Gleixner
2026-03-20 13:21 ` [patch v2 06/14] genirq: Cache the condition for /proc/interrupts exposure Thomas Gleixner
2026-03-23 20:58 ` Radu Rendec
2026-03-24 20:31 ` Thomas Gleixner
2026-03-24 20:36 ` Radu Rendec
2026-03-20 13:21 ` [patch v2 07/14] genirq: Calculate precision only when required Thomas Gleixner
2026-03-25 19:47 ` Radu Rendec
2026-03-20 13:22 ` [patch v2 08/14] genirq: Add rcuref count to struct irq_desc Thomas Gleixner
2026-03-26 18:43 ` Dmitry Ilvokhin
2026-03-20 13:22 ` [patch v2 09/14] genirq: Expose irq_find_desc_at_or_after() in core code Thomas Gleixner
2026-03-26 19:13 ` Dmitry Ilvokhin
2026-03-26 21:11 ` Thomas Gleixner
2026-03-26 21:25 ` Thomas Gleixner
2026-03-20 13:22 ` [patch v2 10/14] genirq/proc: Speed up /proc/interrupts iteration Thomas Gleixner
2026-03-20 13:22 ` [patch v2 11/14] [RFC] genirq: Cache target CPU for single CPU affinities Thomas Gleixner
2026-03-20 13:22 ` [patch v2 12/14] [RFC] genirq/proc: Provide binary statistic interface Thomas Gleixner
2026-03-20 13:22 ` [patch v2 13/14] [RFC] genirq/proc: Provide architecture specific binary statistics Thomas Gleixner
2026-03-20 13:22 ` [patch v2 14/14] [RFC] x86/irq: Hook up architecture specific stats Thomas Gleixner
2026-03-20 16:45 ` [patch v2 00/14] Improve /proc/interrupts further and add a binary interface Michael Kelley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871ph9ges3.ffs@tglx \
--to=tglx@kernel.org \
--cc=d@ilvokhin.com \
--cc=florian.fainelli@broadcom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
--cc=radu@rendec.net \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox