sched/fair: discount task contribution to find CPU with lowest utilization
authorValentin Schneider <valentin.schneider@arm.com>
Fri, 3 Mar 2017 11:43:03 +0000 (11:43 +0000)
committerAmit Pundir <amit.pundir@linaro.org>
Wed, 21 Jun 2017 11:07:44 +0000 (16:37 +0530)
commit619812e4cd6e76ff806edefbec05b01e0d91bf23
tree4a440206784a9b7f0a57be53c5ffbbb182d004cd
parent742bef5da8ad7eb306ee80c117879cbd4f56a425
sched/fair: discount task contribution to find CPU with lowest utilization

In some cases, the new_util of a task can be the same on several
CPUs. This causes an issue because the target_util is only updated
if the current new_util is strictly smaller than target_util.

To fix that, the cpu_util_wake() return value is used alongside the
new_util value. If two CPUs compute the same new_util value,
we'll now also look at their cpu_util_wake() return value. In this
case, the CPU that last ran the task will be chosen in priority.

Change-Id: Ia1ea2c4b3ec39621372c2f748862317d5b497723
Signed-off-by: Valentin Schneider <valentin.schneider@arm.com>
kernel/sched/fair.c