Alpha arch development list
 help / color / mirror / Atom feed
From: Matt Turner <mattst88@gmail.com>
To: linux-alpha@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
	Richard Henderson <richard.henderson@linaro.org>,
	Magnus Lindholm <linmag7@gmail.com>,
	Ivan Kokshaysky <ink@unseen.parts>,
	Matt Turner <mattst88@gmail.com>
Subject: [PATCH 3/3] alpha: Break down rescued IPI counter by type in /proc/interrupts
Date: Sat, 30 May 2026 16:25:44 -0400	[thread overview]
Message-ID: <20260530202544.59231-4-mattst88@gmail.com> (raw)
In-Reply-To: <20260530202544.59231-1-mattst88@gmail.com>

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 <mattst88@gmail.com>
---
 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


  parent reply	other threads:[~2026-05-30 20:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-30 20:25 [PATCH 0/3] alpha SMP fixes for EV7/Marvel Matt Turner
2026-05-30 20:25 ` [PATCH 1/3] alpha: smp: Serialize all synchronous IPI operations to fix SMP deadlock Matt Turner
2026-05-30 20:25 ` [PATCH 2/3] alpha: Fix SMP IPI loss when target CPU is in interrupt handler Matt Turner
2026-05-30 20:25 ` Matt Turner [this message]
2026-05-31  8:24 ` [PATCH 0/3] alpha SMP fixes for EV7/Marvel Magnus Lindholm

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=20260530202544.59231-4-mattst88@gmail.com \
    --to=mattst88@gmail.com \
    --cc=ink@unseen.parts \
    --cc=linmag7@gmail.com \
    --cc=linux-alpha@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=richard.henderson@linaro.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