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

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

Merge "ANDROID: Re-use SUGOV_RT_MAX_FREQ to control uclamp rt behavior"

parents 7ea28f1f 09c8865b
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -1216,8 +1216,12 @@ static void __setscheduler_uclamp(struct task_struct *p,
			continue;

		/* By default, RT tasks always get 100% boost */
		if (unlikely(rt_task(p) && clamp_id == UCLAMP_MIN))
		if (sched_feat(SUGOV_RT_MAX_FREQ) &&
			       unlikely(rt_task(p) &&
			       clamp_id == UCLAMP_MIN)) {

			clamp_value = uclamp_none(UCLAMP_MAX);
		}

		uclamp_se_set(uc_se, clamp_value, false);
	}
@@ -1250,8 +1254,12 @@ static void uclamp_fork(struct task_struct *p)
		unsigned int clamp_value = uclamp_none(clamp_id);

		/* By default, RT tasks always get 100% boost */
		if (unlikely(rt_task(p) && clamp_id == UCLAMP_MIN))
		if (sched_feat(SUGOV_RT_MAX_FREQ) &&
			       unlikely(rt_task(p) &&
			       clamp_id == UCLAMP_MIN)) {

			clamp_value = uclamp_none(UCLAMP_MAX);
		}

		uclamp_se_set(&p->uclamp_req[clamp_id], clamp_value, false);
	}
+1 −1
Original line number Diff line number Diff line
@@ -307,7 +307,7 @@ unsigned long schedutil_cpu_util(int cpu, unsigned long util_cfs,
	unsigned long dl_util, util, irq;
	struct rq *rq = cpu_rq(cpu);

	if (!IS_BUILTIN(CONFIG_UCLAMP_TASK) &&
	if (!IS_BUILTIN(CONFIG_UCLAMP_TASK) && sched_feat(SUGOV_RT_MAX_FREQ) &&
	    type == FREQUENCY_UTIL && rt_rq_is_runnable(&rq->rt)) {
		return max;
	}
+5 −0
Original line number Diff line number Diff line
@@ -94,3 +94,8 @@ SCHED_FEAT(UTIL_EST, true)
 * Fast pre-selection of CPU candidates for EAS.
 */
SCHED_FEAT(FIND_BEST_TARGET, true)

/*
 * Request max frequency from schedutil whenever a RT task is running.
 */
SCHED_FEAT(SUGOV_RT_MAX_FREQ, false)