sched/tune: add support to compute normalized energy
authorPatrick Bellasi <patrick.bellasi@arm.com>
Tue, 12 Jan 2016 18:12:13 +0000 (18:12 +0000)
committerAmit Pundir <amit.pundir@linaro.org>
Wed, 14 Sep 2016 09:28:22 +0000 (14:58 +0530)
commit641e534d8a189177f76e6d72a72009929840b04a
tree9bdf56198e03c32b8733ab55d6fc5a1dd19c4cdc
parent6b529bb329d8cc179524d4747ebb72b5a4b0353e
sched/tune: add support to compute normalized energy

The current EAS implementation considers only energy variations, while it
disregards completely the impact on performance for the selection of
a certain schedule candidate. Moreover, it also makes its decision based
on the "absolute" value of expected energy variations.

In order to properly define a trade-off strategy between increased energy
consumption and performances benefits it is required to compare energy
variations with performance variations.

Thus, both performance and energy metrics must be expressed in comparable
units. While the performance variations are expressed in terms of capacity
deltas, which are defined in the range [0..SCHED_LOAD_SCALE], the same
scale is not used for energy variations.

This patch introduces the function:
  schedtune_normalize_energy(energy_diff)
which returns a normalized value in the same range of capacity variations,
i.e. [0..SCHED_LOAD_SCALE].

A proper set of energy normalization constants are required to provide
a fast division by a constant during the normalziation of the energy_diff.
The value of these constants depends on the specific energy model and
topology of a target device.
Thus, this patch provides also the required support for the computation
at boot time of this set of variables.

Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
kernel/sched/tune.c
kernel/sched/tune.h