In current code, if schedTune check the migration falls into (O) region or (SO) region, then it directly bails out. This works well for boost value > 0, which means the boosted task will always migrate for (O) region and will be rejected to migration for (SO) region.
On the other hand, the PE filter formula can handle (O) region and (SO) region well. So we can use PE filter formula to get correct result as well. This is prerequisite for us to open these two regions for checking.
Furthermore, there have another reason for us to check these two regions is for boost < 0. Thinking about if one task with negative boost value, so in this case it hints the task bias to migrate to CPU with lower capacity, for extreme case, like boost = -100, that means scheduler should _ONLY_ take care to reduce capacity rather than power, in this case it may fall into (SO) region.
So we enable these two regions for checking.
Signed-off-by: Leo Yan leo.yan@linaro.org --- kernel/sched/tune.c | 24 ------------------------ 1 file changed, 24 deletions(-)
diff --git a/kernel/sched/tune.c b/kernel/sched/tune.c index 103b27f..d863cd6 100644 --- a/kernel/sched/tune.c +++ b/kernel/sched/tune.c @@ -155,18 +155,6 @@ schedtune_accept_deltas(int nrg_delta, int cap_delta, struct schedtune *ct; int idx;
- /* Optimal (O) region */ - if (nrg_delta < 0 && cap_delta > 0) { - trace_sched_tune_filter(nrg_delta, cap_delta, 0, 0, 1, 0); - return INT_MAX; - } - - /* Suboptimal (S) region */ - if (nrg_delta > 0 && cap_delta < 0) { - trace_sched_tune_filter(nrg_delta, cap_delta, 0, 0, -1, 5); - return -INT_MAX; - } - /* Get task specific perf Boost/Constraints indexes */ rcu_read_lock(); ct = task_schedtune(task); @@ -726,18 +714,6 @@ int schedtune_accept_deltas(int nrg_delta, int cap_delta, struct task_struct *task) { - /* Optimal (O) region */ - if (nrg_delta < 0 && cap_delta > 0) { - trace_sched_tune_filter(nrg_delta, cap_delta, 0, 0, 1, 0); - return INT_MAX; - } - - /* Suboptimal (S) region */ - if (nrg_delta > 0 && cap_delta < 0) { - trace_sched_tune_filter(nrg_delta, cap_delta, 0, 0, -1, 5); - return -INT_MAX; - } - return __schedtune_accept_deltas(nrg_delta, cap_delta, pe_threshold_idx); } -- 1.9.1