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:Pavankumar Kondeti <pkondeti@codeaurora.org> [satyap@codeaurora.org: trivial changes to arch_scale_cpu_capacity()] Signed-off-by:
Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
Loading
Please register or sign in to comment