linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Re: [RFC][PATCH 4/9] idle: Fix rcu_idle_*() usage
       [not found] ` <20220519213421.808983977@infradead.org>
@ 2022-05-20 23:29   ` Hillf Danton
  0 siblings, 0 replies; only message in thread
From: Hillf Danton @ 2022-05-20 23:29 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: frederic, paulmck, rjw, x86, linux-mm, linux-kernel, jpoimboe

On Thu, 19 May 2022 23:27:54 +0200 Peter Zijlstra wrote:
> @@ -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();

Why does it need to enter once more instead of exit, if it is not typo?

Hillf
>  	tick_unfreeze();
>  	start_critical_timings();
>  
> @@ -233,14 +234,14 @@ int cpuidle_enter_state(struct cpuidle_d
>  
>  	stop_critical_timings();
>  	if (!(target_state->flags & CPUIDLE_FLAG_RCU_IDLE))
> -		rcu_idle_enter();
> +		cpuidle_rcu_enter();
>  
>  	entered_state = target_state->enter(dev, drv, index);
>  	if (WARN_ON_ONCE(!irqs_disabled()))
>  		raw_local_irq_disable();
>  
>  	if (!(target_state->flags & CPUIDLE_FLAG_RCU_IDLE))
> -		rcu_idle_exit();
> +		cpuidle_rcu_exit();

This looks like the correct sequence in sanity.

>  	start_critical_timings();
>  
>  	sched_clock_idle_wakeup_event();


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-20 23:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20220519212750.656413111@infradead.org>
     [not found] ` <20220519213421.808983977@infradead.org>
2022-05-20 23:29   ` [RFC][PATCH 4/9] idle: Fix rcu_idle_*() usage Hillf Danton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox