mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-06 03:45:24 -04:00
sched/walt: Improve the scheduler
This change is for general scheduler improvement. Change-Id: I616acbe5bfdb0e1bf88e923d98b4a3d54d26d942 Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
This commit is contained in:
parent
aa860b5b17
commit
dfd45fa093
3 changed files with 6 additions and 2 deletions
|
|
@ -626,6 +626,7 @@ struct walt_task_struct {
|
|||
struct list_head grp_list;
|
||||
u64 cpu_cycles;
|
||||
cpumask_t cpus_requested;
|
||||
bool iowaited;
|
||||
};
|
||||
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -2828,6 +2828,7 @@ static void __sched_fork(unsigned long clone_flags, struct task_struct *p)
|
|||
p->wts.boost_expires = 0;
|
||||
p->wts.boost_period = 0;
|
||||
p->wts.low_latency = 0;
|
||||
p->wts.iowaited = false;
|
||||
#endif
|
||||
INIT_LIST_HEAD(&p->se.group_node);
|
||||
|
||||
|
|
|
|||
|
|
@ -6577,7 +6577,7 @@ static void walt_find_best_target(struct sched_domain *sd, cpumask_t *cpus,
|
|||
unsigned int target_nr_rtg_high_prio = UINT_MAX;
|
||||
bool rtg_high_prio_task = task_rtg_high_prio(p);
|
||||
cpumask_t visit_cpus;
|
||||
bool io_task_pack = (order_index > 0 && p->in_iowait);
|
||||
bool io_task_pack = (order_index > 0 && p->wts.iowaited);
|
||||
|
||||
/* Find start CPU based on boost value */
|
||||
start_cpu = fbt_env->start_cpu;
|
||||
|
|
@ -8153,9 +8153,11 @@ int can_migrate_task(struct task_struct *p, struct lb_env *env)
|
|||
if (!can_migrate_boosted_task(p, env->src_cpu, env->dst_cpu))
|
||||
return 0;
|
||||
|
||||
if (p->in_iowait && is_min_capacity_cpu(env->dst_cpu) &&
|
||||
#ifdef CONFIG_SCHED_WALT
|
||||
if (p->wts.iowaited && is_min_capacity_cpu(env->dst_cpu) &&
|
||||
!is_min_capacity_cpu(env->src_cpu))
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
if (!cpumask_test_cpu(env->dst_cpu, p->cpus_ptr)) {
|
||||
int cpu;
|
||||
|
|
|
|||
Loading…
Reference in a new issue