[OnePlus 3 & 3T Cross Device Development] vinax89:
Excerpt from LKML Patrick Bellasi on RFC v2 0/8:

"The concept of a simple power-performance tunable that is wholly scheduler

centric is implemented by patches [01-04].

This is where we introduce a ‘global task boosting’ knob which is integrated

with schedutil to allow the scheduler to bias OPP selection. These first 5

patches allow to dynamically tune schedutil up to the point where it behaves

like the existing ‘performance’ governor.

Patches [05-07] extend the basic mechanism to use different boost values for

different tasks. This allows informed runtimes (e.g. Android and ChromeOS) to

feed the scheduler with information related to their knowledge about the

specific demand of different tasks and/or use-cases.

Thanks to SchedTune’s defined interface, the scheduler is now able to collect

simple yet powerful information about tasks: how much the user cares about

their performance.

Although it can be argued that something similar is already provided by the

existing concept of task priority, we believe that

the proposed interface is

much more generic and can be further extended to support both OPP selection and

task placement, thus leading in the future to a more comprehensive energy-aware

scheduler driven solution.

These patches enable schedutil to service interactive workloads like touch

screen interaction

. Only out of tree cpufreq governors like the Interactive

governor were thus far able to service such use cases.

The last patch in the series introduces the concept of ‘negative boosting’.

Negative boosting is

beneficial for mobile devices in scenarios where it is

desired to intentionally reduce the performance of a task by running it at a

lower frequency than the one selected by schedutil.

For certain tasks, like compute intensive background operations or memory

bounded tasks,

negative boosting can have measurable energy-saving benefits

.

In these cases, a negative SchedTune value allows to bias schedutil towards the

selection of a lower OPP. Importantly, this can be achieved using the same

SchedTune interface.

This patch allows to dynamically tune schedutil up to the point where

it

effectively replaces the “powersave” governor

.

Extensive testing of the proposed solution has already been done as SchedTune

is shipping on a production mobile device, with benefits observed for key

use-cases (e.g.

improved responsiveness and performance of key workloads

).

For

positive boost values

, SchedTune can

improve the performance of a task

(i.e. its time to completion) by a quantity which is proportional to the boost

value

. This is reported by the

increasingly higher values of the PerfIndex Avg

as well as the average frequencies

used to execute the task.

For

negative boost values

the performance is progressively reduced, in the

reported case of

-100% boost we verified that the system runs most of its time

at one of the lowest OPPs (thus providing a behavior similar to the powersave

governor) while still running at higher OPPs when other (not negative boosted)

tasks needs to run.

That’s why the reported average frequency (363MHz) is

slightly higher than the minimum OPP (208MHz).

"