Re: [PATCH] cpuidle: Add a predict callback for the governors

From: Rafael J. Wysocki
Date: Thu Feb 21 2019 - 11:18:39 EST

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?