FIXUP: sched: fix SchedFreq integration for both PELT and WALT
authorPatrick Bellasi <patrick.bellasi@arm.com>
Thu, 30 Jun 2016 14:09:24 +0000 (15:09 +0100)
committerAmit Pundir <amit.pundir@linaro.org>
Wed, 14 Sep 2016 09:32:22 +0000 (15:02 +0530)
commitf1bfd7f09d63fefa0859a20e91279eb66dbf7a6f
tree705eebbd3d36a979a675f745be82494f5b8a92dc
parent0b20f616bbf6f23c3dd745d8660a64c04b98d3d5
FIXUP: sched: fix SchedFreq integration for both PELT and WALT

The current kernel allows to use either PELT or WALT to track CPUs utilizations.
One of the main differences between the two approaches is that PELT
tracks only utilization of SCHED_OTHER classes while WALT tracks all tasks
with a single signal.

The current sched_freq_tick does not make this distinction and, when WALT
is in use, we end up adding multiple time the contribution related to
the RT and DL classes. This patch fixes this issue by:

1. providing two different code paths for PELT and WALT, thus granting that
   when we switch to PELT we get the original behaviour based on the assumption
   that class aggregations is done underneath by SchedFreq.

2. avoiding the double accounting of DL and RT workloads, when WALT is in use,
   by just adding a margin to the original WALT signal when we need to check
   if the CFS capacity has to be increased.

Change-Id: I7326fd50e868e97fb5e12351917e9d2969bfdae7
Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
kernel/sched/core.c