Thread (24 messages) 24 messages, 3 authors, 2021-09-06

Re: [PATCH v6 6/7] cpufreq: Skip inefficient frequencies

From: "Rafael J. Wysocki" <rafael@kernel.org>
Date: 2021-09-06 12:08:54

On Mon, Sep 6, 2021 at 10:17 AM Vincent Donnefort
[off-list ref] wrote:
[...]
quoted
quoted
quoted
Moreover, if only efficient frequencies are to be used, RELATION_L
needs to return min(policy->max, the closest efficient frequency equal
to or above the target).
You mean, never returning an inefficient frequency, unless there are no
efficient ones in the range policy->min policy->max ?
No, that's not what I mean.

First note that the target here is clamped between the policy min and
max.  Also bear in mind that each of them is a frequency from the
table, either efficient or inefficient.

In the first step, search through the efficient frequencies only.
That will return you something at or above the target.  If it is at
the target, you're done.  If it is above the target, it may be either
within or above the policy max.  If it is within the policy max,
you're done.  If it is above the policy max, you need to search
through the inefficient frequencies between the target and the policy
max (and you know that there is at least one - the policy max itself).

So what I said previously wasn't particularly precise, sorry about that.
I might have missed something but it seems equivalent to what's currently done:

Find the appropriate frequency, if inefficient go to the efficient one, if
above policy->max return the original inefficient frequency.
It may or may not be equivalent depending on what the efficient one is.

And what is there now doesn't work for RELATION_H if I'm not mistaken.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help