mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 19:47:08 +02:00
sched/walt: update walt_get_indicies for 4 clusters
walt_get_indices() was written for a 3 cluster system. In the future it is necessary to support 2, 3 and 4 cluster systems. Make the appropriate changes to walt_get_indices such that cpus are visited in the correct order for each of these topologies. Change-Id: Iae60c152aaa561326adccc0e92056e598dde2679 Signed-off-by: Stephen Dickey <quic_dickey@quicinc.com>
This commit is contained in:
parent
9003596e0b
commit
a569117648
|
|
@ -165,8 +165,6 @@ static void walt_get_indicies(struct task_struct *p, int *order_index,
|
|||
int *end_index, int per_task_boost, bool is_uclamp_boosted,
|
||||
bool *energy_eval_needed)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
*order_index = 0;
|
||||
*end_index = 0;
|
||||
|
||||
|
|
@ -182,9 +180,12 @@ static void walt_get_indicies(struct task_struct *p, int *order_index,
|
|||
if (is_full_throttle_boost()) {
|
||||
*energy_eval_needed = false;
|
||||
*order_index = num_sched_clusters - 1;
|
||||
if ((*order_index > 1) && task_demand_fits(p,
|
||||
cpumask_first(&cpu_array[*order_index][1])))
|
||||
*end_index = 1;
|
||||
*end_index = num_sched_clusters - 2;
|
||||
|
||||
for (; *end_index >= 0; (*end_index)--)
|
||||
if (task_demand_fits(p,
|
||||
cpumask_first(&cpu_array[*order_index][*end_index])))
|
||||
break;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -193,19 +194,19 @@ static void walt_get_indicies(struct task_struct *p, int *order_index,
|
|||
walt_task_skip_min_cpu(p)) {
|
||||
*energy_eval_needed = false;
|
||||
*order_index = 1;
|
||||
*end_index = max(0, num_sched_clusters - 3);
|
||||
|
||||
if (sysctl_sched_asymcap_boost) {
|
||||
*end_index = 1;
|
||||
(*end_index)++;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = *order_index ; i < num_sched_clusters - 1; i++) {
|
||||
if (task_demand_fits(p, cpumask_first(&cpu_array[i][0])))
|
||||
for (; *order_index < num_sched_clusters - 1; (*order_index)++) {
|
||||
if (task_demand_fits(p, cpumask_first(&cpu_array[*order_index][0])))
|
||||
break;
|
||||
}
|
||||
|
||||
*order_index = i;
|
||||
|
||||
if (*order_index == 0 &&
|
||||
(task_util(p) >= MIN_UTIL_FOR_ENERGY_EVAL) &&
|
||||
!(p->in_iowait && task_in_related_thread_group(p)) &&
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user