sched/walt: Improve the scheduler

The change is for general scheduler improvement.

Change-Id: Ib5d58c23d3a67a81d682e08e58f308e5c659a7f8
Signed-off-by: Kishore Sri venkata Ganesh Bolisetty <bsrivenk@codeaurora.org>
This commit is contained in:
Kishore Sri venkata Ganesh Bolisetty 2021-03-24 17:26:55 -07:00
commit df825be6ef
2 changed files with 26 additions and 3 deletions

View file

@ -4091,13 +4091,24 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial)
vruntime -= thresh;
#ifdef CONFIG_SCHED_WALT
if (entity_is_task(se)) {
if (task_rtg_high_prio(task_of(se)) ||
walt_procfs_low_latency_task(task_of(se))) {
vruntime -= thresh;
se->vruntime = vruntime;
}
if (walt_binder_low_latency_task(task_of(se))) {
vruntime -= sysctl_sched_latency;
se->vruntime = vruntime;
}
if (per_task_boost(task_of(se)) == TASK_BOOST_STRICT_MAX) {
vruntime -= thresh;
vruntime -= sysctl_sched_latency;
se->vruntime = vruntime;
}
if ((per_task_boost(task_of(se)) ==
TASK_BOOST_STRICT_MAX) ||
walt_low_latency_task(task_of(se)) ||
task_rtg_high_prio(task_of(se))) {
vruntime -= sysctl_sched_latency;
vruntime -= thresh;
se->vruntime = vruntime;
return;
}
}

View file

@ -3011,6 +3011,18 @@ static inline bool walt_low_latency_task(struct task_struct *p)
(task_util(p) < sysctl_walt_low_latency_task_threshold);
}
static inline bool walt_binder_low_latency_task(struct task_struct *p)
{
return (p->wts.low_latency & WALT_LOW_LATENCY_BINDER) &&
(task_util(p) < sysctl_walt_low_latency_task_threshold);
}
static inline bool walt_procfs_low_latency_task(struct task_struct *p)
{
return (p->wts.low_latency & WALT_LOW_LATENCY_PROCFS) &&
(task_util(p) < sysctl_walt_low_latency_task_threshold);
}
/* Is frequency of two cpus synchronized with each other? */
static inline int same_freq_domain(int src_cpu, int dst_cpu)
{