Skip to content
Commit 21d28cd2 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

cpuidle: teo: Do not call tick_nohz_get_sleep_length() upfront



Because the cost of calling tick_nohz_get_sleep_length() may increase
in the future, reorder the code in teo_select() so it first uses the
statistics to pick up a candidate idle state and applies the utilization
heuristic to it and only then calls tick_nohz_get_sleep_length() to
obtain the sleep length value and refine the selection if necessary.

This change by itself does not cause tick_nohz_get_sleep_length() to
be called less often, but it prepares the code for subsequent changes
that will do so.

Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: default avatarKajetan Puchalski <kajetan.puchalski@arm.com>
Tested-by: default avatarAnna-Maria Behnsen <anna-maria@linutronix.de>
parent 9a41e16f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment