[PATCH 3/3] alpha: Break down rescued IPI counter by type in /proc/interrupts
Matt Turner <[email protected]> Sat, 30 May 2026 16:25:44 -0400
| Newsgroups | org.kernel.vger.linux-alpha,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
Add per-type rescued IPI counters to cpuinfo_alpha: rescued_reschedule_count (RIP:) rescued_call_func_count (RIF:) rescued_cpu_stop_count (RIS:) alpha_poll_ipi_inirq() peeks at ipi_data[cpu].bits before handle_ipi() clears them via xchg(), then increments the appropriate per-CPU counter. Expose all three as separate rows in /proc/interrupts alongside the existing "IPI:" row. This lets us distinguish the deadlock-causing subset (RIF: IPI_CALL_FUNC, of which wait=1 callers are the ones that deadlock) from the harmless majority (RIP: reschedule). A non-zero RIF count confirms the EV7/IO7 edge-triggered IPI loss hypothesis. Note: handle_ipi() also increments ipi_count unconditionally, so the "IPI:" row in /proc/interrupts includes both normal and rescued deliveries. The RIP:/RIF:/RIS: counters sample bits before the xchg(); bits that arrive after the READ_ONCE are drained by handle_ipi() but not reflected in these counters — they are approximate but sufficient for diagnosis. Assisted-by: Claude:claude-sonnet-4-6 Signed-off-by: Matt Turner <[email protected]> --- arch/alpha/include/asm/smp.h | 3 +++ arch/alpha/kernel/irq.c | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git ./arch/alpha/include/asm/smp.h ./arch/alpha/include/asm/smp.h index 8bd529376cf6..98f522ee367f 100644 --- ./arch/alpha/include/asm/smp.h +++ ./arch/alpha/include/asm/smp.h @@ -31,6 +31,9 @@ struct cpuinfo_alpha { int need_new_asn; int asn_lock; unsigned long ipi_count; + unsigned long rescued_reschedule_count; + unsigned long rescued_call_func_count; + unsigned long rescued_cpu_stop_count; unsigned long prof_multiplier; unsigned long prof_counter; unsigned char mcheck_expected; diff --git ./arch/alpha/kernel/irq.c ./arch/alpha/kernel/irq.c index c67047c5d830..34709e1c42c5 100644 --- ./arch/alpha/kernel/irq.c +++ ./arch/alpha/kernel/irq.c @@ -76,6 +76,18 @@ int arch_show_interrupts(struct seq_file *p, int prec) for_each_online_cpu(j) seq_printf(p, "%10lu ", cpu_data[j].ipi_count); seq_putc(p, '\n'); + seq_puts(p, "RIP: "); + for_each_online_cpu(j) + seq_printf(p, "%10lu ", cpu_data[j].rescued_reschedule_count); + seq_puts(p, " Rescued IPIs: reschedule\n"); + seq_puts(p, "RIF: "); + for_each_online_cpu(j) + seq_printf(p, "%10lu ", cpu_data[j].rescued_call_func_count); + seq_puts(p, " Rescued IPIs: call function\n"); + seq_puts(p, "RIS: "); + for_each_online_cpu(j) + seq_printf(p, "%10lu ", cpu_data[j].rescued_cpu_stop_count); + seq_puts(p, " Rescued IPIs: cpu stop\n"); #endif seq_puts(p, "PMI: "); for_each_online_cpu(j) -- 2.53.0