All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <frederic@kernel.org>
To: Joel Fernandes <joel@joelfernandes.org>
Cc: "Zhang, Qiang1" <qiang1.zhang@intel.com>,
	"Paul E. McKenney" <paulmck@kernel.org>,
	quic_neeraju@quicinc.com, rcu@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] rcu: Remove impossible wakeup rcu GP kthread action from rcu_report_qs_rdp()
Date: Sat, 21 Jan 2023 00:04:51 +0100	[thread overview]
Message-ID: <Y8seE8Tr1w0UWf+m@lothringen> (raw)
In-Reply-To: <B3E458A6-9279-4716-B242-873C77EC1E3A@joelfernandes.org>

On Fri, Jan 20, 2023 at 08:27:03AM -0500, Joel Fernandes wrote:
> 
> Sure, I know what the code currently does, I am asking why and it feels wrong.
> 
> I suggest you slightly change your approach to not assuming the code should be bonafide correct and then fixing it (which is ok once in a while), and asking higher level questions to why things are the way they are in the first place (that is just my suggestion and I am not in a place to provide advice, far from it, but I am just telling you my approach — I care more about the code than increasing my patch count :P).
> 
> If you are in an intermediate state, part way to a !nocb state — you may have
> missed a nocb-related accel and wake, correct? Why does that matter? Once we
> transition to a !nocb state, we do not do a post-qs-report accel+wake anyway
> as we clearly know from the discussion.

I'm confused. We are doing that acceleration on qs report for !nocb CPU, right?

> So why do we need to do it if we
> missed it for the intermediate stage? So, I am not fully sure yet what that
> needac is doing and why it is needed.

To summarize:

* If the CPU is NOCB, all the callbacks advance and acceleration is performed
  by the rcuo/rcuog kthreads.

* If the CPU is not NOCB, all the callbacks acceleration is performed by the
  CPU, such as in the case of rcu_report_qs_rdp().

* If the CPU is transitionning from NOCB to !NOCB or from !NOCB to NOCB, the
  kthreads may not be available to do the advance/acceleration, so we must do
  it locally. That's the needacc path.

What am I missing?

Thanks.

  parent reply	other threads:[~2023-01-20 23:04 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-18  7:30 [PATCH v3] rcu: Remove impossible wakeup rcu GP kthread action from rcu_report_qs_rdp() Zqiang
2023-01-18 10:18 ` Frederic Weisbecker
2023-01-18 18:07 ` Paul E. McKenney
2023-01-18 23:30   ` Zhang, Qiang1
2023-01-20  3:14   ` Joel Fernandes
2023-01-20  3:17     ` Joel Fernandes
2023-01-20  4:09     ` Zhang, Qiang1
2023-01-20  4:40       ` Joel Fernandes
2023-01-20  8:19         ` Zhang, Qiang1
2023-01-20 13:27           ` Joel Fernandes
2023-01-20 20:33             ` Paul E. McKenney
2023-01-20 22:35               ` Frederic Weisbecker
2023-01-20 23:20                 ` Paul E. McKenney
2023-01-20 23:04             ` Frederic Weisbecker [this message]
2023-01-23 15:22               ` Joel Fernandes
2023-01-23 16:27                 ` Frederic Weisbecker
2023-01-23 20:54                   ` Joel Fernandes
2023-01-23 21:11                     ` Frederic Weisbecker
2023-01-24 16:58                       ` Joel Fernandes
2023-01-21  0:38             ` Zhang, Qiang1
2023-01-24 17:10               ` 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=Y8seE8Tr1w0UWf+m@lothringen \
    --to=frederic@kernel.org \
    --cc=joel@joelfernandes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@kernel.org \
    --cc=qiang1.zhang@intel.com \
    --cc=quic_neeraju@quicinc.com \
    --cc=rcu@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.