Skip to content
Commit c3155efd authored by Quentin Perret's avatar Quentin Perret
Browse files

energy_model: Reflect 80% capacity margin in optimal placement



The Linux scheduler always tries to provide at least 20% of idle time to
all CPUs by not placing big tasks on small CPUs, and by selecting
appropriate frequencies. This is implemented by the 'capacity_margin'
coefficient in CFS, and schedutil's map_util_freq() (from 5.0 onwards).

However, this is not yet reflected in Lisa's optimal placement algorithm
which will assume a 39% task fits on a 40% CPU, for example. This
difference is the root cause for many task_task_placement failures on
some boards (TC2) although there is not much we can actually do to 'fix'
the kernel. One possibility would be to make the energy margin larger,
but that would lower the bar for all platforms so an alternative
solution is preferable.

In order to solve this, reflect the kernel's 80% capacity margin in
Lisa's algorithm to ensure an apple to apple comparison in the task
placement test. This arguably lowers the level of abstraction of the
test by making it deal with 'implementation caveats' rather than doing
pure functional testing. But we already do this for other things (e.g.
load tracking) and that should make the test actually work more
reliably, hence enabling better regression testing.

Signed-off-by: default avatarQuentin Perret <quentin.perret@arm.com>
parent 75d79857
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment