Re: [PATCH v3 resend 0/6] Implement call_rcu_lazy() and miscellaneous fixes
From: Paul E. McKenney
Date: Wed Aug 10 2022 - 22:52:01 EST
On Wed, Aug 10, 2022 at 10:31:56PM -0400, Joel Fernandes wrote:
>
>
> On 8/10/2022 10:23 PM, Joel Fernandes wrote:
> >
> >
> > On 8/8/2022 11:45 PM, Joel Fernandes (Google) wrote:
> >> Just a refresh of v3 with one additional debug patch. v3's cover letter is here:
> >> https://lore.kernel.org/all/20220713213237.1596225-1-joel@xxxxxxxxxxxxxxxxx/
> >>
> >> I just started working on this again while I have some time during paternity
> >> leave ;-) So I thought I'll just send it out again. No other changes other
> >> than that 1 debug patch I added on the top.
> >>
> >> Next I am going to go refine the power results as mentioned in Paul's comments
> >> on the last cover letter.
> >
> > Side note: Here is another big selling point for call_rcu_lazy().
> > Instead of _lazy(), if you just increased jiffies_till_first_fqs, and
> > slowed *all* call_rcu() down to achieve the same effect, that would
> > affect percpu refcounters switching to atomic-mode, for example.
> >
> > They switch to atomic mode by calling __percpu_ref_switch_mode() which
> > is called by percpu_ref_switch_to_atomic_sync().>
> > This will slow this call down for the full lazy duration which will slow
> > down suspend in blk_pre_runtime_suspend().
>
> Correction while I am going on the record (got to be careful these
> days). It *might* slow down RCU for the full lazy duration, unless of
> course a fly-by rescue call_rcu() comes in.
Just unload a module, which if I remember correctly invokes rcu_barrier().
Lots of rescue callbacks. ;-)
Thanx, Paul