diff mbox series

[2/2] cpuidle: Remove unnecessary current_clr_polling() on poll_idle()

Message ID 20231113220326.7933-3-frederic@kernel.org (mailing list archive)
State Superseded, archived
Headers show
Series cpuidle: Remove unnecessary TIF_NR_POLLING clear/TIF_NEED_RESCHED folding | expand

Commit Message

Frederic Weisbecker Nov. 13, 2023, 10:03 p.m. UTC
There is no point in clearing TIF_NR_POLLING and folding TIF_NEED_RESCHED
upon poll_idle() exit because cpuidle_idle_call() is going to set again
TIF_NR_POLLING anyway. Also if TIF_NEED_RESCHED is set, it will be
folded and TIF_NR_POLLING will be cleared at the end of do_idle().

Acked-by: Rafael J. Wysocki <rafael@kernel.org>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
---
 drivers/cpuidle/poll_state.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Frederic Weisbecker Nov. 22, 2023, 9:01 p.m. UTC | #1
Le Mon, Nov 13, 2023 at 05:03:26PM -0500, Frederic Weisbecker a écrit :
> There is no point in clearing TIF_NR_POLLING and folding TIF_NEED_RESCHED
> upon poll_idle() exit because cpuidle_idle_call() is going to set again
> TIF_NR_POLLING anyway. Also if TIF_NEED_RESCHED is set, it will be
> folded and TIF_NR_POLLING will be cleared at the end of do_idle().
> 
> Acked-by: Rafael J. Wysocki <rafael@kernel.org>
> Signed-off-by: Frederic Weisbecker <frederic@kernel.org>

Please discard this one, I'm taking a new way to deal with that.

Thanks.

> ---
>  drivers/cpuidle/poll_state.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/cpuidle/poll_state.c b/drivers/cpuidle/poll_state.c
> index 9b6d90a72601..d5cb3eb85a54 100644
> --- a/drivers/cpuidle/poll_state.c
> +++ b/drivers/cpuidle/poll_state.c
> @@ -40,8 +40,6 @@ static int __cpuidle poll_idle(struct cpuidle_device *dev,
>  	}
>  	raw_local_irq_disable();
>  
> -	current_clr_polling();
> -
>  	return index;
>  }
>  
> -- 
> 2.42.1
>
diff mbox series

Patch

diff --git a/drivers/cpuidle/poll_state.c b/drivers/cpuidle/poll_state.c
index 9b6d90a72601..d5cb3eb85a54 100644
--- a/drivers/cpuidle/poll_state.c
+++ b/drivers/cpuidle/poll_state.c
@@ -40,8 +40,6 @@  static int __cpuidle poll_idle(struct cpuidle_device *dev,
 	}
 	raw_local_irq_disable();
 
-	current_clr_polling();
-
 	return index;
 }