Re: [PATCH] cpuidle: Add a predict callback for the governors
From: Daniel Lezcano
Date: Thu Feb 21 2019 - 12:40:09 EST
On 21/02/2019 17:18, Rafael J. Wysocki wrote:
> On Thu, Feb 21, 2019 at 3:56 PM Daniel Lezcano
> <daniel.lezcano@xxxxxxxxxx> wrote:
>>
>> Predicting the next event on the current CPU is implemented in the
>> idle state selection function, thus the selection logic and the
>> prediction are tied together and it is hard to decorrelate both.
>>
>> The following change introduces the cpuidle function to give the
>> opportunity to the governor to store the guess estimate of the
>> different source of wakeup and then reuse them in the selection
>> process. Consequently we end up with two separate operations clearly
>> identified.
>>
>> As the next events are stored in the cpuidle device structure it is
>> easy to propagate them in the different governor callbacks.
>
> Can you explain a bit how you would use this new callback in a governor?
Sure.
Today we have the selection and the prediction tied together. The
prediction is modulated with some inputs coming from the governor's
policy (eg. performance multiplier).
It is hard to know if the prediction is correct or not, hard to know the
duration of the computation for the next event and hard to know if the
idle state selection succeeded because of a good prediction or a good
governor policy.
I propose to provide the callback where we fill the guess estimated next
events on the system, so we can trace them and benchmark the computation
time.
The selection of the idle state becomes an separate action where we can
apply any specific governor heuristic or policy.
By separating the selection and the prediction, we can identify where
the weakness is in our test scenario: the prediction or the governor
selection policy.
--
<http://www.linaro.org/> Linaro.org â Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog