BACKPORT: time: tick-sched: Reorganize idle tick management code
Prepare the scheduler tick code for reworking the idle loop to avoid stopping the tick in some cases. The idea is to split the nohz idle entry call to decouple the idle time stats accounting and preparatory work from the actual tick stop code, in order to later be able to delay the tick stop once we reach more power-knowledgeable callers. Move away the tick_nohz_start_idle() invocation from __tick_nohz_idle_enter(), rename the latter to __tick_nohz_idle_stop_tick() and define tick_nohz_idle_stop_tick() as a wrapper around it for calling it from the outside. Make tick_nohz_idle_enter() only call tick_nohz_start_idle() instead of calling the entire __tick_nohz_idle_enter(), add another wrapper disabling and enabling interrupts around tick_nohz_idle_stop_tick() and make the current callers of tick_nohz_idle_enter() call it too to retain their current functionality. Cherry-picked from 0e7767687fdabfc58d5046e7488632bf2ecd4d0c - Fixed conflict with hrtimer_next_event_base which does not have an extra parameter in the backported code Change-Id: Iae3b22cdc0db13212af07249b085b4b97abf557e Signed-off-by:Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by:
Frederic Weisbecker <frederic@kernel.org> Cc: Leo Yan <leo.yan@linaro.org> Cc: Todd Kjos <tkjos@google.com> Cc: Joel Fernandes <joelaf@google.com> Cc: Paven Kondati <pkondeti@qti.qualcomm.com> Signed-off-by:
Daniel Lezcano <daniel.lezcano@linaro.org>
Loading
Please register or sign in to comment