lkml.org 
[lkml]   [2022]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v8 02/13] rcu: Make call_rcu() lazy to save power
On Wed, Oct 12, 2022 at 03:54:25PM -0400, Joel Fernandes wrote:
> On Tue, Oct 11, 2022 at 7:10 PM Frederic Weisbecker <frederic@kernel.org> wrote:
> >
> > On Tue, Oct 11, 2022 at 06:01:31PM +0000, Joel Fernandes (Google) wrote:
> > > @@ -269,10 +294,14 @@ static void wake_nocb_gp_defer(struct rcu_data *rdp, int waketype,
> > > raw_spin_lock_irqsave(&rdp_gp->nocb_gp_lock, flags);
> > >
> > > /*
> > > - * Bypass wakeup overrides previous deferments. In case
> > > - * of callback storm, no need to wake up too early.
> > > + * Bypass wakeup overrides previous deferments. In case of
> > > + * callback storm, no need to wake up too early.
> > > */
> > > - if (waketype == RCU_NOCB_WAKE_BYPASS) {
> > > + if (waketype == RCU_NOCB_WAKE_LAZY &&
> > > + READ_ONCE(rdp->nocb_defer_wakeup) == RCU_NOCB_WAKE_NOT) {
> >
> > No need for READ_ONCE() here.
> >
> > > + mod_timer(&rdp_gp->nocb_timer, jiffies + jiffies_till_flush);
> > > + WRITE_ONCE(rdp_gp->nocb_defer_wakeup, waketype);
> > > + } else if (waketype == RCU_NOCB_WAKE_BYPASS) {
> > > mod_timer(&rdp_gp->nocb_timer, jiffies + 2);
> > > WRITE_ONCE(rdp_gp->nocb_defer_wakeup, waketype);
> > > } else {
> > > @@ -611,6 +682,8 @@ static void nocb_gp_wait(struct rcu_data *my_rdp)
> > > unsigned long flags;
> > > bool gotcbs = false;
> > > unsigned long j = jiffies;
> > > + bool lazy = false;
> > > + long lazy_ncbs;
> >
> > Looks like lazy_ncbs can be declared withing the loop, as well as bypass_cbs.
> >
> > Anyway, apart from such boring cosmectics:
> >
> > Acked-by: Frederic Weisbecker <frederic@kernel.org>
>
> Thanks, I folded the cosmetic suggestions with the Ack and pushed it to:
> https://github.com/joelagnel/linux-kernel.git (branch rcu-next-oct.12.22)

Just following back up with Frederic to see if all of your guys' words
had the same meanings. ;-)

Thanx, Paul

\
 
 \ /
  Last update: 2022-10-14 17:46    [W:0.047 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site