[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YpXhB4yjdNKOe6Np@hirez.programming.kicks-ass.net>
Date: Tue, 31 May 2022 11:33:59 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: "Gautham R. Shenoy" <gautham.shenoy@....com>
Cc: frederic@...nel.org, paulmck@...nel.org, rjw@...ysocki.net,
x86@...nel.org, linux-kernel@...r.kernel.org, jpoimboe@...nel.org
Subject: Re: [RFC][PATCH 4/9] idle: Fix rcu_idle_*() usage
On Mon, May 23, 2022 at 03:16:11PM +0530, Gautham R. Shenoy wrote:
> On Thu, May 19, 2022 at 11:27:54PM +0200, Peter Zijlstra wrote:
> > The whole disable-RCU, enable-IRQS dance is very intricate since
> > changing IRQ state is traced, which depends on RCU.
> >
> > Add two helpers for the cpuidle case that mirror the entry code.
> >
> > Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> > ---
>
> [...]
> >
> > --- a/drivers/cpuidle/cpuidle.c
> > +++ b/drivers/cpuidle/cpuidle.c
> > @@ -13,6 +13,7 @@
> > #include <linux/mutex.h>
> > #include <linux/sched.h>
> > #include <linux/sched/clock.h>
> > +#include <linux/sched/idle.h>
> > #include <linux/notifier.h>
> > #include <linux/pm_qos.h>
> > #include <linux/cpu.h>
> > @@ -150,12 +151,12 @@ static void enter_s2idle_proper(struct c
> > */
> > stop_critical_timings();
> > if (!(target_state->flags & CPUIDLE_FLAG_RCU_IDLE))
> > - rcu_idle_enter();
> > + cpuidle_rcu_enter();
> > target_state->enter_s2idle(dev, drv, index);
> > if (WARN_ON_ONCE(!irqs_disabled()))
> > - local_irq_disable();
> > + raw_local_irq_disable();
> > if (!(target_state->flags & CPUIDLE_FLAG_RCU_IDLE))
> > - rcu_idle_exit();
> > + cpuidle_rcu_enter();
>
> Shouldn't this be cpuidle_rcu_exit() ?
Yes, very much so... soon I should buy a new supply of brown paper bags
:-)
Powered by blists - more mailing lists