]> git.baikalelectronics.ru Git - kernel.git/commit
time: tick-sched: Split tick_nohz_stop_sched_tick()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 5 Apr 2018 17:07:57 +0000 (19:07 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 7 Apr 2018 16:48:24 +0000 (18:48 +0200)
commitaa1d5de954803809af864a886e81d27a6c4fe4e0
tree2147dbac5c1e70ada0deb4d9e9197a6ccdbb299e
parentfb222cc275a360513a713d6bf9b892c90d1c4705
time: tick-sched: Split tick_nohz_stop_sched_tick()

In order to address the issue with short idle duration predictions
by the idle governor after the scheduler tick has been stopped, split
tick_nohz_stop_sched_tick() into two separate routines, one computing
the time to the next timer event and the other simply stopping the
tick when the time to the next timer event is known.

Prepare these two routines to be called separately, as one of them
will be called by the idle governor in the cpuidle_select() code
path after subsequent changes.

Update the former callers of tick_nohz_stop_sched_tick() to use
the new routines, tick_nohz_next_event() and tick_nohz_stop_tick(),
instead of it and move the updates of the sleep_length field in
struct tick_sched into __tick_nohz_idle_stop_tick() as it doesn't
need to be updated anywhere else.

There should be no intentional visible changes in functionality
resulting from this change.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Frederic Weisbecker <frederic@kernel.org>
kernel/time/tick-sched.c
kernel/time/tick-sched.h