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

Commit dfd45fa0 authored by Pavankumar Kondeti's avatar Pavankumar Kondeti
Browse files

sched/walt: Improve the scheduler



This change is for general scheduler improvement.

Change-Id: I616acbe5bfdb0e1bf88e923d98b4a3d54d26d942
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
parent aa860b5b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -626,6 +626,7 @@ struct walt_task_struct {
	struct list_head		grp_list;
	u64				cpu_cycles;
	cpumask_t			cpus_requested;
	bool				iowaited;
};

#else
+1 −0
Original line number Diff line number Diff line
@@ -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);

+4 −2
Original line number Diff line number Diff line
@@ -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;