提交 7059b366 编写于 作者: R Rafael J. Wysocki

sched: idle: Avoid retaining the tick when it has been stopped

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: 554c8aa8 (sched: idle: Select idle state before stopping the tick)
Cc: 4.17+ <stable@vger.kernel.org> # 4.17+
Acked-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 50f7ccc6
...@@ -190,7 +190,7 @@ static void cpuidle_idle_call(void) ...@@ -190,7 +190,7 @@ static void cpuidle_idle_call(void)
*/ */
next_state = cpuidle_select(drv, dev, &stop_tick); next_state = cpuidle_select(drv, dev, &stop_tick);
if (stop_tick) if (stop_tick || tick_nohz_tick_stopped())
tick_nohz_idle_stop_tick(); tick_nohz_idle_stop_tick();
else else
tick_nohz_idle_retain_tick(); tick_nohz_idle_retain_tick();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册