mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-11 13:27:06 +09:00
ANDROID: cpufreq/schedutil: Select frequency using util_avg for RT
Schedutil always requests max frequency whenever a RT task is running. Now that we have a better estimate of the utilization of RT runqueues, it is possible to make a less conservative decision and scale frequency according to the needs of the RT tasks. To do so, protect the RT-go-to-max code with a new sched_feature. The sched_feature is disabled by default, hence favoring energy savings as required in mobile environments. Signed-off-by: Quentin Perret <quentin.perret@arm.com> Change-Id: Ic9f01c8703d4f843addaa0d684012a422fe9f3b8
This commit is contained in:
@@ -204,7 +204,8 @@ unsigned long schedutil_freq_util(int cpu, unsigned long util_cfs,
|
||||
struct rq *rq = cpu_rq(cpu);
|
||||
unsigned long util, irq;
|
||||
|
||||
if (type == FREQUENCY_UTIL && rt_rq_is_runnable(&rq->rt))
|
||||
if (sched_feat(SUGOV_RT_MAX_FREQ) && type == FREQUENCY_UTIL &&
|
||||
rt_rq_is_runnable(&rq->rt))
|
||||
return max;
|
||||
|
||||
/*
|
||||
|
||||
@@ -104,3 +104,8 @@ SCHED_FEAT(FIND_BEST_TARGET, true)
|
||||
* those tasks through the mainline slow path.
|
||||
*/
|
||||
SCHED_FEAT(EAS_PREFER_IDLE, true)
|
||||
|
||||
/*
|
||||
* Request max frequency from schedutil whenever a RT task is running.
|
||||
*/
|
||||
SCHED_FEAT(SUGOV_RT_MAX_FREQ, false)
|
||||
|
||||
Reference in New Issue
Block a user