lkml.org 
[lkml]   [2023]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] sched/idle: disable tick in idle=poll idle entry

Commit a5183862e76fdc25f36b39c2489b816a5c66e2e5
("tick/nohz: Conditionally restart tick on idle exit") allows
a nohz_full CPU to enter idle and return from it with the
scheduler tick disabled (since the tick might be undesired noise).

The idle=poll case still unconditionally restarts the tick when entering
idle.

To reduce the noise for that case as well, stop the tick when entering
idle, for the idle=poll case.

tick_nohz_idle_exit (called if the NEED_RESCHED bit is set)
is responsible for re-enabling the tick when necessary.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>

---

diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c
index 342f58a329f5..fdc240988ea9 100644
--- a/kernel/sched/idle.c
+++ b/kernel/sched/idle.c
@@ -276,7 +276,7 @@ static void do_idle(void)
* idle as we know that the IPI is going to arrive right away.
*/
if (cpu_idle_force_poll || tick_check_broadcast_expired()) {
- tick_nohz_idle_restart_tick();
+ tick_nohz_idle_stop_tick();
cpu_idle_poll();
} else {
cpuidle_idle_call();
\
 
 \ /
  Last update: 2023-06-08 03:13    [W:0.061 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site