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

Commit 248c7ba7 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "sched/fair: Skip energy_diff() for need_idle tasks"

parents 21f99cce c0d07e76
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -786,6 +786,11 @@ DEFINE_EVENT(sched_task_util, sched_task_util_imbalance,
	TP_PROTO(struct task_struct *p, int task_cpu, unsigned long task_util, int nominated_cpu, int target_cpu, int ediff, bool need_idle),
	TP_ARGS(p, task_cpu, task_util, nominated_cpu, target_cpu, ediff, need_idle)
);

DEFINE_EVENT(sched_task_util, sched_task_util_need_idle,
	TP_PROTO(struct task_struct *p, int task_cpu, unsigned long task_util, int nominated_cpu, int target_cpu, int ediff, bool need_idle),
	TP_ARGS(p, task_cpu, task_util, nominated_cpu, target_cpu, ediff, need_idle)
);
#endif

/*
+8 −0
Original line number Diff line number Diff line
@@ -7144,6 +7144,14 @@ static int energy_aware_wake_cpu(struct task_struct *p, int target, int sync)
			return target_cpu;
		}

		if (need_idle) {
			trace_sched_task_util_need_idle(p, task_cpu(p),
						task_util(p),
						target_cpu, target_cpu,
						0, need_idle);
			return target_cpu;
		}

		/*
		 * We always want to migrate the task to the best CPU when
		 * placement boost is active.