mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joel Fernandes <joelagnelf@nvidia.com>
To: linux-kernel@vger.kernel.org
Cc: "Paul E . McKenney" <paulmck@kernel.org>,
	Frederic Weisbecker <frederic@kernel.org>,
	Neeraj Upadhyay <neeraj.upadhyay@kernel.org>,
	Josh Triplett <josh@joshtriplett.org>,
	Boqun Feng <boqun@kernel.org>,
	Uladzislau Rezki <urezki@gmail.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	Zqiang <qiang.zhang@linux.dev>,
	Davidlohr Bueso <dave@stgolabs.net>,
	rcu@vger.kernel.org
Subject: Re: [PATCH v4 0/8] rcu: fix stuck defer_qs_pending state and add rescue timer
Date: Thu, 25 Jun 2026 20:44:57 -0400	[thread overview]
Message-ID: <c3636f33-bcdd-4883-9b24-5f9ff1ff1778@nvidia.com> (raw)
In-Reply-To: <20260626004301.1632168-1-joelagnelf@nvidia.com>



On 6/25/2026 8:42 PM, Joel Fernandes wrote:
> This series fixes a bug where rdp->defer_qs_pending can remain stuck in
> PENDING when a preempted reader's quiescent state is reported up-tree via
> a path other than the deferred-QS irq-work handler (FQS scan, hotplug
> transition, expedited GP IPI, context switch). Once stuck, the pending
> gate in rcu_read_unlock_special() silently suppresses all future arming
> attempts on that CPU. The series adds PENDING -> IDLE transitions at the
> missing sites (patches 1-7), including the case where the deferred-QS
> irq-work handler may run between segments of a compound section (per Paul
> McKenney's counter-example) and the softirq deferred-QS arming path.
> 
> Patch 8 adds a per-CPU rescue hrtimer that bounds the worst-case
> deferred-QS reporting latency: when the irq-work handler lands in a clean
> (non-reader, non-compound) context it reports the quiescent state directly
> via the new rcu_preempt_deferred_qs_try_report() helper, and the rescue timer
> reuses the same helper so that, under preempt=none, the QS report is quick
> without depending on the scheduler.  The rescue timer is cancelled from the
> normal deferred-QS report path so it does not fire once the quiescent state
> has already been reported.
> 
> This version is rebased on top of Paul's latest rcu/dev branch. The
> rcutorture reader-end deboost test patches that were folded into v3 are now
> in rcu/dev and have been dropped here. The git tree below additionally
> carries two debug-only commits on top of the series ([TEST COMMIT], not for
> merge): a detector that WARNs if defer_qs_pending is stuck at GP cleanup,
> and an rcutorture tweak that gives the async deboost mechanisms up to 500us
> before warning. Applied alone on unmodified mainline, the detector reliably
> fires within 5 minutes under TREE03 rcutorture; with the full fix applied I
> could not reproduce the issue.
> 
> The git tree with all patches can be found at:
> git://git.kernel.org/pub/scm/linux/kernel/git/jfern/linux.git (tag: rcu-dqs-stuck-v4-20260625)

Just fyi, the 2 "[TEST COMMIT]" patches not for merge are in the above tag. I
missed including it in the LKML posting, but they are not for merge anyway.


  parent reply	other threads:[~2026-06-26  0:45 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-26  0:42 Joel Fernandes
2026-06-26  0:42 ` [PATCH v4 1/8] rcu: introduce rcu_defer_qs_clear() helper Joel Fernandes
2026-07-15 20:43   ` Paul E. McKenney
2026-06-26  0:42 ` [PATCH v4 2/8] rcu: clear defer_qs_pending when notifying GP changes Joel Fernandes
2026-07-15 20:45   ` Paul E. McKenney
2026-06-26  0:42 ` [PATCH v4 3/8] rcu: clear defer_qs_pending in handler for compounded sections Joel Fernandes
2026-07-15 20:50   ` Paul E. McKenney
2026-06-26  0:42 ` [PATCH v4 4/8] rcu: drop redundant defer_qs_pending clear in irqrestore handler Joel Fernandes
2026-07-15 20:58   ` Paul E. McKenney
2026-06-26  0:42 ` [PATCH v4 5/8] rcu: clear defer_qs_pending at expedited IPI entry Joel Fernandes
2026-07-15 21:01   ` Paul E. McKenney
2026-06-26  0:42 ` [PATCH v4 6/8] rcu: set need_resched on softirq deferred-QS arming path Joel Fernandes
2026-07-15 21:12   ` Paul E. McKenney
2026-06-26  0:43 ` [PATCH v4 7/8] rcu: clear defer_qs_pending in deferred-QS bail when nesting > 0 Joel Fernandes
2026-07-15 21:30   ` Paul E. McKenney
2026-06-26  0:43 ` [PATCH v4 8/8] rcu: add per-CPU rescue hrtimer for deferred-QS reporting Joel Fernandes
2026-07-15 21:35   ` Paul E. McKenney
2026-06-26  0:44 ` Joel Fernandes [this message]
2026-06-26 14:56 ` [PATCH v4 0/8] rcu: fix stuck defer_qs_pending state and add rescue timer Joel Fernandes

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=c3636f33-bcdd-4883-9b24-5f9ff1ff1778@nvidia.com \
    --to=joelagnelf@nvidia.com \
    --cc=boqun@kernel.org \
    --cc=dave@stgolabs.net \
    --cc=frederic@kernel.org \
    --cc=jiangshanlai@gmail.com \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=neeraj.upadhyay@kernel.org \
    --cc=paulmck@kernel.org \
    --cc=qiang.zhang@linux.dev \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=urezki@gmail.com \
    /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

Powered by JetHome