FIXUP: sched/tune: update accouting before CPU capacity
authorPatrick Bellasi <patrick.bellasi@arm.com>
Wed, 24 Aug 2016 10:27:27 +0000 (11:27 +0100)
committerAmit Pundir <amit.pundir@linaro.org>
Wed, 14 Sep 2016 09:47:01 +0000 (15:17 +0530)
commit41e58098703b24e33f8372f82a65bb0f82ecf14a
tree29be9f61ca0809c956ed956e5fa605a3a1abcab1
parent592c519f5c8d191df3f1132ee717331d118f8a7b
FIXUP: sched/tune: update accouting before CPU capacity

The SchedTune tasks accounting is used to identify how many tasks are in
a boostgroup and thus to bias the selection of an OPP based on the
maximum boost value of the active boostgroups.
The current implementation however update the accounting after CPU
capacity has been update. This has two effects:
a) when we enqueue a boosted task, we do not immediately boost its CPU
b) when we dequeue a boosted task, we can keep a CPU boosted even if not
   required

This patch change the order of the SchedTune accounting and SchedFreq
updated to ensure to have always an updated representation of which
boosted tasks are runnable on a CPU before updating its capacity.

Reported-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
kernel/sched/fair.c