mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-26 06:33:19 -04:00
sched/fair: Improve the scheduler
This change is for general scheduler improvement. Change-Id: I15c01c20691899053e0aa760923ba0db644f2b73 Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org> [satyap@codeaurora.org: port to 5.4 and resolve trivial merge conflicts] Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
This commit is contained in:
parent
692aa6b9f5
commit
c47c3c9ed1
1 changed files with 12 additions and 4 deletions
|
|
@ -3817,7 +3817,7 @@ util_est_dequeue(struct cfs_rq *cfs_rq, struct task_struct *p, bool task_sleep)
|
|||
}
|
||||
|
||||
static inline bool
|
||||
bias_to_waker_cpu(struct task_struct *p, int cpu, int start_cpu)
|
||||
bias_to_this_cpu(struct task_struct *p, int cpu, int start_cpu)
|
||||
{
|
||||
bool base_test = cpumask_test_cpu(cpu, &p->cpus_mask) &&
|
||||
cpu_active(cpu);
|
||||
|
|
@ -6430,6 +6430,7 @@ enum fastpaths {
|
|||
NONE = 0,
|
||||
SYNC_WAKEUP,
|
||||
PREV_CPU_FASTPATH,
|
||||
MANY_WAKEUP,
|
||||
};
|
||||
|
||||
static void find_best_target(struct sched_domain *sd, cpumask_t *cpus,
|
||||
|
|
@ -7029,10 +7030,17 @@ int find_energy_efficient_cpu(struct task_struct *p, int prev_cpu,
|
|||
if (need_idle)
|
||||
sync = 0;
|
||||
|
||||
if (sync && bias_to_waker_cpu(p, cpu, start_cpu)) {
|
||||
if (sync && bias_to_this_cpu(p, cpu, start_cpu)) {
|
||||
best_energy_cpu = cpu;
|
||||
fbt_env.fastpath = SYNC_WAKEUP;
|
||||
goto sync_wakeup;
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (is_many_wakeup(sibling_count_hint) && prev_cpu != cpu &&
|
||||
bias_to_this_cpu(p, prev_cpu, start_cpu)) {
|
||||
best_energy_cpu = prev_cpu;
|
||||
fbt_env.fastpath = MANY_WAKEUP;
|
||||
goto done;
|
||||
}
|
||||
|
||||
rcu_read_lock();
|
||||
|
|
@ -7214,7 +7222,7 @@ unlock:
|
|||
(capacity_orig_of(prev_cpu) <= capacity_orig_of(start_cpu)))
|
||||
best_energy_cpu = prev_cpu;
|
||||
|
||||
sync_wakeup:
|
||||
done:
|
||||
trace_sched_task_util(p, cpumask_bits(candidates)[0], best_energy_cpu,
|
||||
sync, need_idle, fbt_env.fastpath, placement_boost,
|
||||
start_t, boosted, is_rtg, get_rtg_status(p), start_cpu);
|
||||
|
|
|
|||
Loading…
Reference in a new issue