Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c9507ba3 authored by Leo Yan's avatar Leo Yan Committed by Joonwoo Park
Browse files

sched/fair: fix for group_smaller_cpu_capacity()



Function group_smaller_cpu_capacity() checks if one schedule group has
smaller capacity than another one:

return sg->sgc->max_capacity + capacity_margin - SCHED_LOAD_SCALE <
					ref->sgc->max_capacity;

The value (capacity_margin - SCHED_LOAD_SCALE) is an absolute value for
difference checking, so it's easily broken if two scheduler groups have
no much difference (like CA53.Fast+CA53.Slow system).

When this function is invalid the schedule group with misfit tasks
will be wrongly cleared flag so misfit task has no chance to migrate to
higher capacity CPU.

This patch is to directly check schedule group maximum_capacity and has
a minor fix for maximum_capacity assignment with original capacity.

Change-Id: I8071f2ee90e0823c3232018bdbf27e759fba0ec1
Signed-off-by: default avatarLeo Yan <leo.yan@linaro.org>
Patch-mainline: eas-dev @ 12/22/16, 15:58
Signed-off-by: default avatarJoonwoo Park <joonwoop@codeaurora.org>
parent f95e8dee
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment