lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220929164204.GO4196@paulmck-ThinkPad-P17-Gen-1>
Date:   Thu, 29 Sep 2022 09:42:04 -0700
From:   "Paul E. McKenney" <paulmck@...nel.org>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Joel Fernandes <joel@...lfernandes.org>,
        Frederic Weisbecker <fweisbec@...il.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        linux-kernel@...r.kernel.org, Boqun Feng <boqun.feng@...il.com>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>
Subject: Re: RCU vs NOHZ

On Thu, Sep 29, 2022 at 06:23:16PM +0200, Peter Zijlstra wrote:
> On Thu, Sep 29, 2022 at 08:46:18AM -0700, Paul E. McKenney wrote:
> > On Thu, Sep 29, 2022 at 08:20:44AM -0700, Paul E. McKenney wrote:
> 
> > > > > There is a directly invoked RCU hook for any transition that enables or
> > > > > disables the tick, namely the ct_*_enter() and ct_*_exit() functions,
> > > > > that is, those functions formerly known as rcu_*_enter() and rcu_*_exit().
> > > > 
> > > > Context tracking doesn't know about NOHZ, therefore RCU can't either.
> > > > Context tracking knows about IDLE, but not all IDLE is NOHZ-IDLE.
> > > > 
> > > > Specifically we have:
> > > > 
> > > > 	ct_{idle,irq,nmi,user,kernel}_enter()
> > > > 
> > > > And none of them are related to NOHZ in the slightest. So no, RCU does
> > > > not have a NOHZ callback.
> > > > 
> > > > I'm still thikning you're conflating NOHZ_FULL (stopping the tick when
> > > > in userspace) and regular NOHZ (stopping the tick when idle).
> > 
> > Exactly how are ct_user_enter() and ct_user_exit() completely unrelated
> > to nohz_full CPUs?
> 
> That's the thing; I'm not talking about nohz_full. I'm talking about
> regular nohz. World of difference there.

And indeed, for !nohz_full CPUs, the tick continues throughout userspace
execution.  But you really did have ct_user_enter() and ct_user_exit()
on your list.

And for idle (as opposed to nohz_full userspace execution), there is still
ct_{idle,irq,nmi}_enter().  And RCU does pay attention to these.

So exactly what are you trying to tell me here?  ;-)

> nohz_full is a gimmick that shouldn't be used outside of very specific
> cases. Regular nohz otoh is used by everybody always.

I will let you take that up with the people using it.

							Thanx, Paul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ