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

Commit c593b697 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "sched/walt: Improve the scheduler"

parents daf5b313 df825be6
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)
{