All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@kernel.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Joel Fernandes <joel@joelfernandes.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-kernel@vger.kernel.org, Boqun Feng <boqun.feng@gmail.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>
Subject: Re: RCU vs NOHZ
Date: Thu, 15 Sep 2022 09:06:00 -0700	[thread overview]
Message-ID: <20220915160600.GA246308@paulmck-ThinkPad-P17-Gen-1> (raw)
In-Reply-To: <YyLksEr05QTNo05Q@hirez.programming.kicks-ass.net>

On Thu, Sep 15, 2022 at 10:39:12AM +0200, Peter Zijlstra wrote:
> Hi,
> 
> After watching Joel's talk about RCU and idle ticks I was wondering
> about why RCU doesn't have NOHZ hooks -- that is regular NOHZ, not the
> NOHZ_FULL stuff.

It actually does, but they have recently moved into the context-tracking
code, courtesy of Frederic's recent patch series.

> These deep idle states are only feasible during NOHZ idle, and the NOHZ
> path is already relatively expensive (which is offset by then mostly
> staying idle for a long while).
> 
> Specifically my thinking was that when a CPU goes NOHZ it can splice
> it's callback list onto a global list (cmpxchg), and then the
> jiffy-updater CPU can look at and consume this global list (xchg).
> 
> Before you say... but globals suck (they do), NOHZ already has a fair
> amount of global state, and as said before, it's offset by the CPU then
> staying idle for a fair while. If there is heavy contention on the NOHZ
> data, the idle governor is doing a bad job by selecting deep idle states
> whilst we're not actually idle for long.
> 
> The above would remove the reason for RCU to inhibit NOHZ.
> 
> 
> Additionally; when the very last CPU goes idle (I think we know this
> somewhere, but I can't reaily remember where) we can insta-advance the
> QS machinery and run the callbacks before going (NOHZ) idle.
> 
> 
> Is there a reason this couldn't work? To me this seems like a much
> simpler solution than the whole rcu-cb thing.

To restate Joel's reply a bit...

Maybe.

Except that we need rcu_nocbs anyway for low latency and HPC applications.
Given that we have it, and given that it totally eliminates RCU-induced
idle ticks, how would it help to add cmpxchg-based global offloading?

							Thanx, Paul

  parent reply	other threads:[~2022-09-15 16:06 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-15  8:39 RCU vs NOHZ Peter Zijlstra
2022-09-15 15:37 ` Joel Fernandes
2022-09-15 16:06 ` Paul E. McKenney [this message]
2022-09-15 18:50   ` Peter Zijlstra
2022-09-15 19:14     ` Paul E. McKenney
2022-09-15 22:30       ` Peter Zijlstra
2022-09-16  3:40         ` Joel Fernandes
2022-09-16  7:58         ` Paul E. McKenney
2022-09-16  9:20           ` Peter Zijlstra
2022-09-16 18:11             ` Joel Fernandes
2022-09-17 13:35               ` Peter Zijlstra
2022-09-17 13:52                 ` Joel Fernandes
2022-09-17 14:28                   ` Paul E. McKenney
2022-09-17 14:25             ` Paul E. McKenney
2022-09-21 21:36               ` Paul E. McKenney
2022-09-23 15:12                 ` Joel Fernandes
2022-09-23 16:01                   ` Paul E. McKenney
2022-09-23 17:47                     ` Joel Fernandes
2022-09-23 18:15                       ` Paul E. McKenney
2022-09-29 11:06                 ` Peter Zijlstra
2022-09-29 10:55               ` Peter Zijlstra
2022-09-29 15:20                 ` Paul E. McKenney
2022-09-29 15:46                   ` Paul E. McKenney
2022-09-29 16:05                     ` Joel Fernandes
2022-09-29 16:23                     ` Peter Zijlstra
2022-09-29 16:42                       ` Paul E. McKenney
2022-09-29 19:01                         ` Peter Zijlstra
2022-09-29 19:52                           ` Paul E. McKenney
2022-09-29 16:18                   ` Peter Zijlstra
2022-09-29 16:36                     ` Paul E. McKenney
2022-09-29 19:08                       ` Peter Zijlstra
2022-09-29 19:56                         ` Paul E. McKenney
2022-09-30 14:48                           ` Paul E. McKenney
2022-09-23 19:47 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=20220915160600.GA246308@paulmck-ThinkPad-P17-Gen-1 \
    --to=paulmck@kernel.org \
    --cc=boqun.feng@gmail.com \
    --cc=fweisbec@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=rjw@rjwysocki.net \
    --cc=tglx@linutronix.de \
    /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.