Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit df825be6 authored by Kishore Sri venkata Ganesh Bolisetty's avatar Kishore Sri venkata Ganesh Bolisetty
Browse files

sched/walt: Improve the scheduler



The change is for general scheduler improvement.

Change-Id: Ib5d58c23d3a67a81d682e08e58f308e5c659a7f8
Signed-off-by: default avatarKishore Sri venkata Ganesh Bolisetty <bsrivenk@codeaurora.org>
parent 08db65b8
Loading
Loading
Loading
Loading
+14 −3
Original line number Diff line number Diff line
@@ -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;
			}
		}
+12 −0
Original line number Diff line number Diff line
@@ -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)
{