sched/fair: do not use boosted margin for prefer_high_cap case

For prefer_high_cap case, it will start from mid/max cpu already,
so there is no need to use boosted margin for task placement.

Bug: 160082718
Test: tasks scheduled as expected
Signed-off-by: Rick Yiu <rickyiu@google.com>
Change-Id: I4df27b1e468484f5d9aedfa57ee444f397a8da81
This commit is contained in:
Rick Yiu 2020-06-29 16:01:33 +08:00 committed by spakkkk
parent d674064463
commit c65251c440

View File

@ -3973,11 +3973,13 @@ static inline bool task_fits_capacity(struct task_struct *p,
* CPU.
*/
if (capacity_orig_of(task_cpu(p)) > capacity_orig_of(cpu))
margin = schedtune_task_boost(p) > 0 ?
margin = schedtune_task_boost(p) > 0 &&
!schedtune_prefer_high_cap(p) ?
sched_capacity_margin_down_boosted[task_cpu(p)] :
sched_capacity_margin_down[task_cpu(p)];
else
margin = schedtune_task_boost(p) > 0 ?
margin = schedtune_task_boost(p) > 0 &&
!schedtune_prefer_high_cap(p) ?
sched_capacity_margin_up_boosted[task_cpu(p)] :
sched_capacity_margin_up[task_cpu(p)];