Messages in this thread Patch in this message | | | From | "Rafael J. Wysocki" <> | Subject | [PATCH] sched: idle: Avoid retaining the tick when it has been stopped | Date | Thu, 09 Aug 2018 19:08:34 +0200 |
| |
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
If the tick has been stopped already, but the governor has not asked to stop it (which it can do sometimes), the idle loop should invoke tick_nohz_idle_stop_tick(), to let tick_nohz_stop_tick() take care of this case properly.
Fixes: 554c8aa8ecad (sched: idle: Select idle state before stopping the tick) Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> --- kernel/sched/idle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-pm/kernel/sched/idle.c =================================================================== --- linux-pm.orig/kernel/sched/idle.c +++ linux-pm/kernel/sched/idle.c @@ -190,7 +190,7 @@ static void cpuidle_idle_call(void) */ next_state = cpuidle_select(drv, dev, &stop_tick); - if (stop_tick) + if (stop_tick || tick_nohz_tick_stopped()) tick_nohz_idle_stop_tick(); else tick_nohz_idle_retain_tick();
| |