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

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

Merge "sched: EAS: fix idle_get_state_idx()"

parents 52287af6 c3dae85c
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -6870,8 +6870,7 @@ static int energy_aware_wake_cpu(struct task_struct *p, int target, int sync)
			if (new_util > capacity_orig_of(i))
				continue;

			cpu_idle_idx = cpu_rq(i)->nr_running ? -1 :
				       idle_get_state_idx(cpu_rq(i));
			cpu_idle_idx = idle_get_state_idx(cpu_rq(i));

			if (!need_idle &&
			    add_capacity_margin(new_util_cum) <
+0 −3
Original line number Diff line number Diff line
@@ -1970,9 +1970,6 @@ static int find_lowest_rq(struct task_struct *task)

				if (sysctl_sched_cstate_aware)
					cpu_idle_idx =
					    (cpu == smp_processor_id() ||
					     cpu_rq(cpu)->nr_running) ?
					     -1 :
					     idle_get_state_idx(cpu_rq(cpu));

				if (add_capacity_margin(new_util_cum) <
+4 −0
Original line number Diff line number Diff line
@@ -1491,6 +1491,10 @@ static inline void idle_set_state_idx(struct rq *rq, int idle_state_idx)
static inline int idle_get_state_idx(struct rq *rq)
{
	WARN_ON(!rcu_read_lock_held());

	if (rq->nr_running || cpu_of(rq) == raw_smp_processor_id())
		return -1;

	return rq->idle_state_idx;
}
#else