Re: [RFC PATCH] net: stmmac: Fix the problem about interrupt storm
From: Zxyan Zhu
Date: Wed Nov 25 2026 - 02:57:33 EST
Hello Romain, Cathy, Avi,
We hit exactly the interrupt-storm scenario you discussed, on a local board
running a PREEMPT_RT kernel, and I'd like to ask whether this series is
still being worked on.
Our setup and trigger:
- stmmac with dwxgmac2 (xgmac) and dwmac4 (gmac) MACs, kernel 6.18.34+
with PREEMPT_RT and panic_on_rcu_stall.
- Trigger: fault-injection of an uncorrectable MAC safety error, which
makes stmmac_global_err() schedule stmmac_reset_subtask(), i.e.
dev_close()/dev_open().
Symptom:
About 30 seconds after the injected error the board panics with an RCU
stall (rcu_preempt detected stalls, rcuc starved).
Root cause (confirmed on-board):
- The main level-triggered IRQ storms at roughly 820k irqs/sec during the
reset window (irq count jumps from ~220k to ~23M in ~28s).
- stmmac_interrupt() returns IRQ_HANDLED without clearing any status while
STMMAC_DOWN is set -- exactly the "unconditionally returning without
clearing any interrupt flags" behaviour you flagged as dangerous.
- The level IRQ stays asserted -> infinite storm -> starves rcuc -> RCU
grace period never converges -> panic.
This matches Romain's point: the unconditional early-return in the
STMMAC_DOWN state is the actual storm source, not the TMOUTEN/safety
watchdog.
Fix we validated:
disable_irq(priv->dev->irq) right after set_bit(STMMAC_DOWN, &priv->state)
in stmmac_reset_subtask(), before dev_close(). This masks the level IRQ
during the synchronize_net() window.
Results: irq count peaks at ~724 instead of ~23M.
Questions:
1. Is anyone still working on this series, or should we revive Cathy's RFC
with the evidence above?
2. Would a patch along the lines of "disable_irq around the STMMAC_DOWN
window" be acceptable, or do you prefer the more general approach you
suggested -- wrapping the STMMAC_DOWN set/clear in a handler that also
disables all interrupts?
Best regards,
Zxyan Zhu