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)
committerPunit Agrawal <punit.agrawal@arm.com>
Mon, 21 Mar 2016 14:57:37 +0000 (14:57 +0000)
commiteac91ca0659786f2ceef9c4a5b63b9dc686dab2d
treea49759126d8cde01d944ba44964a7db0cd191d0a
parent81cc39cc812f53517f0bf4881795e2917aace6c5
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