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

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

Merge "sched: Improve the scheduler"

parents 7bf6f154 4768291a
Loading
Loading
Loading
Loading
+14 −7
Original line number Diff line number Diff line
@@ -349,6 +349,12 @@ static void update_task_cpu_cycles(struct task_struct *p, int cpu,
		p->cpu_cycles = read_cycle_counter(cpu, wallclock);
}

static inline bool is_ed_enabled(void)
{
	return (walt_rotation_enabled || (sched_boost_policy() !=
		SCHED_BOOST_NONE));
}

void clear_ed_task(struct task_struct *p, struct rq *rq)
{
	if (p == rq->ed_task)
@@ -367,8 +373,7 @@ bool early_detection_notify(struct rq *rq, u64 wallclock)

	rq->ed_task = NULL;

	if ((!walt_rotation_enabled && sched_boost_policy() ==
			SCHED_BOOST_NONE) || !rq->cfs.h_nr_running)
	if (!is_ed_enabled() || !rq->cfs.h_nr_running)
		return 0;

	list_for_each_entry(p, &rq->cfs_tasks, se.group_node) {
@@ -874,12 +879,14 @@ void fixup_busy_time(struct task_struct *p, int new_cpu)
		irq_work_queue(&walt_migration_irq_work);
	}

	if (is_ed_enabled()) {
		if (p == src_rq->ed_task) {
			src_rq->ed_task = NULL;
			dest_rq->ed_task = p;
		} else if (is_ed_task(p, wallclock)) {
			dest_rq->ed_task = p;
		}
	}

done:
	if (p->state == TASK_WAKING)