[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221014154547.GA710792@paulmck-ThinkPad-P17-Gen-1>
Date: Fri, 14 Oct 2022 08:45:47 -0700
From: "Paul E. McKenney" <paulmck@...nel.org>
To: Joel Fernandes <joel@...lfernandes.org>
Cc: Frederic Weisbecker <frederic@...nel.org>, rcu@...r.kernel.org,
linux-kernel@...r.kernel.org, rushikesh.s.kadam@...el.com,
urezki@...il.com, neeraj.iitr10@...il.com, rostedt@...dmis.org,
youssefesmat@...gle.com, surenb@...gle.com
Subject: Re: [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@...nel.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@...nel.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
Powered by blists - more mailing lists