mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
BACKPORT: sched/fair: Remove wake_cap()
Capacity-awareness in the wake-up path previously involved disabling
wake_affine in certain scenarios. We have just made select_idle_sibling()
capacity-aware, so this isn't needed anymore.
Remove wake_cap() entirely.
Bug: 120440300
Signed-off-by: Morten Rasmussen <morten.rasmussen@arm.com>
[Changelog tweaks]
Signed-off-by: Valentin Schneider <valentin.schneider@arm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
[Changelog tweaks]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lkml.kernel.org/r/20200206191957.12325-5-valentin.schneider@arm.com
(cherry picked from commit 25ac227a25ac946e0356772012398cd1710a8bab)
[Fixed trivial conflict with 24c4437797]
Signed-off-by: Valentin Schneider <valentin.schneider@arm.com>
Change-Id: Ic91c61ee94c3aa54c573a4cd3fe6882e5fde6335
This commit is contained in:
parent
7874cf9c9f
commit
6bec3fbeac
1 changed files with 1 additions and 29 deletions
|
|
@ -6246,33 +6246,6 @@ static unsigned long cpu_util_without(int cpu, struct task_struct *p)
|
|||
return min_t(unsigned long, util, capacity_orig_of(cpu));
|
||||
}
|
||||
|
||||
/*
|
||||
* Disable WAKE_AFFINE in the case where task @p doesn't fit in the
|
||||
* capacity of either the waking CPU @cpu or the previous CPU @prev_cpu.
|
||||
*
|
||||
* In that case WAKE_AFFINE doesn't make sense and we'll let
|
||||
* BALANCE_WAKE sort things out.
|
||||
*/
|
||||
static int wake_cap(struct task_struct *p, int cpu, int prev_cpu)
|
||||
{
|
||||
long min_cap, max_cap;
|
||||
|
||||
if (!static_branch_unlikely(&sched_asym_cpucapacity))
|
||||
return 0;
|
||||
|
||||
min_cap = min(capacity_orig_of(prev_cpu), capacity_orig_of(cpu));
|
||||
max_cap = cpu_rq(cpu)->rd->max_cpu_capacity.val;
|
||||
|
||||
/* Minimum capacity is close to max, no need to abort wake_affine */
|
||||
if (max_cap - min_cap < max_cap >> 3)
|
||||
return 0;
|
||||
|
||||
/* Bring task utilization in sync with prev_cpu */
|
||||
sync_entity_load_avg(&p->se);
|
||||
|
||||
return !task_fits_capacity(p, min_cap);
|
||||
}
|
||||
|
||||
/*
|
||||
* Predicts what cpu_util(@cpu) would return if @p was migrated (and enqueued)
|
||||
* to @dst_cpu.
|
||||
|
|
@ -6580,8 +6553,7 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int sd_flag, int wake_f
|
|||
new_cpu = prev_cpu;
|
||||
}
|
||||
|
||||
want_affine = !wake_wide(p) && !wake_cap(p, cpu, prev_cpu) &&
|
||||
cpumask_test_cpu(cpu, p->cpus_ptr);
|
||||
want_affine = !wake_wide(p) && cpumask_test_cpu(cpu, p->cpus_ptr);
|
||||
}
|
||||
|
||||
rcu_read_lock();
|
||||
|
|
|
|||
Loading…
Reference in a new issue