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

Commit d0549da8 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: Consider an idle CPU outside c-state as an active CPU"

parents 31ff7d69 646fe8f4
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -6816,13 +6816,17 @@ struct find_best_target_env {

static bool is_packing_eligible(struct task_struct *p, int target_cpu,
				struct find_best_target_env *fbt_env,
				unsigned int target_cpus_count)
				unsigned int target_cpus_count,
				int best_idle_cstate)
{
	unsigned long tutil, estimated_capacity;

	if (fbt_env->placement_boost || fbt_env->need_idle)
		return false;

	if (best_idle_cstate == -1)
		return false;

	if (target_cpus_count != 1)
		return true;

@@ -7183,7 +7187,7 @@ static inline int find_best_target(struct task_struct *p, int *backup_cpu,
	} while (sg = sg->next, sg != sd->groups);

	if (best_idle_cpu != -1 && !is_packing_eligible(p, target_cpu, fbt_env,
					active_cpus_count)) {
					active_cpus_count, best_idle_cstate)) {
		if (target_cpu == task_cpu(p))
			fbt_env->avoid_prev_cpu = true;