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

Skip to content
Commit 3b70c457 authored by Pavankumar Kondeti's avatar Pavankumar Kondeti
Browse files

sched: use the CPU true capacity while sorting the min/mid/max CPUs



The current code uses the rq->cpu_capacity_orig while sorting
the min/mid/max CPUs while rebuilding the scheduler domains. This
rq->cpu_capacity_orig is subjected to changed when the scaling max
frequency is clipped for that CPU's frequency domain. Since we don't
recompute the min/mid/max CPUs when the capacity is changed, the
sorting becomes incorrect later when the frequency limits are lifted.

The task CPU selection algorithm depends heavily on min/mid/max CPUs
and changing them on the fly results in incorrect task placement.
Hence use the true capacity of CPUs while sorting the min/mid/max
CPUs. This means that the sorting gets changed only when CPUs are
hotplugged out, otherwise these reflect the correct topology
all the time.

The max_cpu_capacity struct in root domain also maintains the
max CPU and its capacity. Since we now use true capacity, there
is no need to compute this on the fly. So move this evaluation from
the periodic load balancer to the scheduler domain rebuilding.

The rq->cpu_capacity_orig is still subjected to change upon frequency
or thermal limits. So we still identify the cases where tasks not
fitting on the max/mid CPUs when the capacity is reduced.

Change-Id: I42735accd079b2ece1eb58d1ebcf322d454e33a2
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
parent 52a05ad8
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