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

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

sched/fair: Add EAS_USE_NEED_IDLE feature



The schedtune.prefer_idle flag makes scheduler to look for an idle
CPU across all clusters. Where as the need_idle flag limits the
search to the lower capacity cluster which strikes a better
balance between power and performance compared to prefer_idle.

Add EAS_USE_NEED_IDLE feature, when enabled need_idle path is
enforced for tasks that has schedtune.prefer_idle set.

Change-Id: Ic83cd9f8bae1112efa4e62de3c60a86ba9c777d7
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
parent ec7e154d
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -7251,7 +7251,12 @@ static int select_energy_cpu_brute(struct task_struct *p, int prev_cpu, int sync
#endif

	fbt_env.rtg_target = rtg_target;
	if (sched_feat(EAS_USE_NEED_IDLE) && prefer_idle) {
		fbt_env.need_idle = true;
		prefer_idle = false;
	} else {
		fbt_env.need_idle = wake_to_idle(p);
	}
	fbt_env.placement_boost = task_sched_boost(p) ?
				  sched_boost_policy() != SCHED_BOOST_NONE :
				  false;
+6 −0
Original line number Diff line number Diff line
@@ -98,3 +98,9 @@ SCHED_FEAT(MIN_CAPACITY_CAPPING, false)
 * OFF: Use whichever of target or backup saves most.
 */
SCHED_FEAT(FBT_STRICT_ORDER, false)
/*
 * Enforce schedtune.prefer_idle to take need_idle path.
 * ON: schedtune.prefer_idle is replaced with need_idle
 * OFF: schedtune.prefer_idle is honored as is.
 */
SCHED_FEAT(EAS_USE_NEED_IDLE, true)