mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 03:27:03 +02:00
sched/walt: Improve the scheduler
This change is for general scheduler improvement. Change-Id: I30b3899e191d880e741f922323d0826b5c292498 Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
This commit is contained in:
parent
07efb5ada9
commit
4fb4acb57c
|
|
@ -209,18 +209,27 @@ static void walt_find_best_target(struct sched_domain *sd,
|
|||
int prev_cpu = task_cpu(p);
|
||||
int active_candidate = -1;
|
||||
int order_index = fbt_env->order_index, end_index = fbt_env->end_index;
|
||||
int stop_index = INT_MAX;
|
||||
int cluster;
|
||||
unsigned int target_nr_rtg_high_prio = UINT_MAX;
|
||||
bool rtg_high_prio_task = task_rtg_high_prio(p);
|
||||
cpumask_t visit_cpus;
|
||||
struct walt_task_struct *wts = (struct walt_task_struct *) p->android_vendor_data1;
|
||||
bool io_task_pack = (order_index > 0 && wts->iowaited);
|
||||
struct cfs_rq *cfs_rq;
|
||||
|
||||
/* Find start CPU based on boost value */
|
||||
start_cpu = fbt_env->start_cpu;
|
||||
|
||||
if (fbt_env->strict_max || io_task_pack)
|
||||
/*
|
||||
* For higher capacity worth I/O tasks, stop the search
|
||||
* at the end of higher capacity cluster(s).
|
||||
*/
|
||||
if (order_index > 0 && wts->iowaited) {
|
||||
stop_index = num_sched_clusters - 2;
|
||||
most_spare_wake_cap = LONG_MIN;
|
||||
}
|
||||
|
||||
if (fbt_env->strict_max)
|
||||
target_max_spare_cap = LONG_MIN;
|
||||
|
||||
if (p->state == TASK_RUNNING)
|
||||
|
|
@ -296,8 +305,7 @@ static void walt_find_best_target(struct sched_domain *sd,
|
|||
* than the one required to boost the task.
|
||||
*/
|
||||
new_util = max(min_util, new_util);
|
||||
if (!(fbt_env->strict_max || io_task_pack) &&
|
||||
new_util > capacity_orig)
|
||||
if (!fbt_env->strict_max && new_util > capacity_orig)
|
||||
continue;
|
||||
|
||||
/*
|
||||
|
|
@ -386,6 +394,9 @@ static void walt_find_best_target(struct sched_domain *sd,
|
|||
if ((cluster >= end_index) && (target_cpu != -1) &&
|
||||
walt_target_ok(target_cpu, order_index))
|
||||
break;
|
||||
|
||||
if (most_spare_cap_cpu != -1 && cluster >= stop_index)
|
||||
break;
|
||||
}
|
||||
|
||||
if (best_idle_cpu != -1)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user