From: Frederic Weisbecker <frederic@kernel.org>
To: "Paul E. McKenney" <paulmck@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Boqun Feng <boqun.feng@gmail.com>,
Joel Fernandes <joel@joelfernandes.org>,
Neeraj Upadhyay <neeraj.upadhyay@amd.com>,
Uladzislau Rezki <urezki@gmail.com>,
Zqiang <qiang.zhang1211@gmail.com>, rcu <rcu@vger.kernel.org>
Subject: Re: [PATCH 3/3] rcu/exp: Remove needless CPU up quiescent state report
Date: Fri, 21 Feb 2025 16:52:39 +0100 [thread overview]
Message-ID: <Z7ihR0eMfoJMi-qx@localhost.localdomain> (raw)
In-Reply-To: <c5ea9684-291f-4952-b834-ed8e39cfdf8f@paulmck-laptop>
Le Wed, Feb 19, 2025 at 06:58:36AM -0800, Paul E. McKenney a écrit :
> On Sat, Feb 15, 2025 at 11:23:45PM +0100, Frederic Weisbecker wrote:
> > > Before. There was also some buggy debug code in play. Also, to get the
> > > failure, it was necessary to make TREE03 disable preemption, as stock
> > > TREE03 has an empty sync_sched_exp_online_cleanup() function.
> > >
> > > I am rerunning the test with a WARN_ON_ONCE() after the early exit from
> > > the sync_sched_exp_online_cleanup(). Of course, lack of a failure does
> > > not necessairly indicate
> >
> > Cool, thanks!
>
> No failures. But might it be wise to put this WARN_ON_ONCE() in,
> let things go for a year or two, and complete the removal if it never
> triggers? Or is the lack of forward progress warning enough?
Hmm, what prevents a WARN_ON_ONCE() after the early exit of
sync_sched_exp_online_cleanup() to hit?
All it takes is for sync_sched_exp_online_cleanup() to execute between
sync_exp_reset_tree() and __sync_rcu_exp_select_node_cpus() manage
to send an IPI.
But we can warn about the lack of forward progress after a few iterations
of the retry_ipi label in __sync_rcu_exp_select_node_cpus().
>
> > > > And if after do we know why?
> > >
> > > Here are some (possibly bogus) possibilities that came to mind:
> > >
> > > 1. There is some coming-online race that deprives the incoming
> > > CPU of an IPI, but nevertheless marks that CPU as blocking the
> > > current grace period.
> >
> > Arguably there is a tiny window between rcutree_report_cpu_starting()
> > and set_cpu_online() that could make ->qsmaskinitnext visible before
> > cpu_online() and therefore delay the IPI a bit. But I don't expect
> > more than a jiffy to fill up the gap. And if that's relevant, note that
> > only !PREEMPT_RCU is then "fixed" by sync_sched_exp_online_cleanup() here.
>
> Agreed. And I vaguely recall that there was some difference due to
> preemptible RCU's ability to clean up at the next rcu_read_unlock(),
> though more recently, possibly deferred.
Perhaps at the time but today at least I can't find any.
Thanks.
next prev parent reply other threads:[~2025-02-21 15:52 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-13 23:25 [PATCH 0/3] rcu/exp updates Frederic Weisbecker
2025-02-13 23:25 ` [PATCH 1/3] rcu/exp: Protect against early QS report Frederic Weisbecker
2025-02-14 9:10 ` Paul E. McKenney
2025-03-13 16:40 ` Frederic Weisbecker
2025-03-13 17:04 ` Paul E. McKenney
2025-02-13 23:25 ` [PATCH 2/3] rcu/exp: Remove confusing needless full barrier on task unblock Frederic Weisbecker
2025-02-25 21:59 ` Joel Fernandes
2025-02-26 0:08 ` Paul E. McKenney
2025-02-26 12:52 ` Frederic Weisbecker
2025-02-26 15:04 ` Paul E. McKenney
2025-02-26 15:26 ` Joel Fernandes
2025-02-26 15:34 ` Frederic Weisbecker
2025-02-13 23:25 ` [PATCH 3/3] rcu/exp: Remove needless CPU up quiescent state report Frederic Weisbecker
2025-02-14 9:01 ` Paul E. McKenney
2025-02-14 12:10 ` Frederic Weisbecker
2025-02-15 10:38 ` Paul E. McKenney
2025-02-15 22:23 ` Frederic Weisbecker
2025-02-19 14:58 ` Paul E. McKenney
2025-02-19 15:55 ` Paul E. McKenney
2025-02-21 15:31 ` Frederic Weisbecker
2025-02-21 15:52 ` Frederic Weisbecker [this message]
2025-02-26 0:00 ` Paul E. McKenney
2025-03-03 20:10 ` Paul E. McKenney
2025-03-14 14:39 ` Frederic Weisbecker
2025-03-18 17:07 ` Paul E. McKenney
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=Z7ihR0eMfoJMi-qx@localhost.localdomain \
--to=frederic@kernel.org \
--cc=boqun.feng@gmail.com \
--cc=joel@joelfernandes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neeraj.upadhyay@amd.com \
--cc=paulmck@kernel.org \
--cc=qiang.zhang1211@gmail.com \
--cc=rcu@vger.kernel.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