mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 06:09:23 -04:00
ANDROID: Re-use SUGOV_RT_MAX_FREQ to control uclamp rt behavior
By default uclamp RT tasks will use the max frequency, which is not the desired default behavior on mobile devices. Re-use the SUGOV_RT_MAX_FREQ sched_feat to control the default behavior. When SUGOV_RT_MAX_FREQ is NOT selected, the uclamp_min value of the RT tasks will be 0. Bug: 120440300 Signed-off-by: Qais Yousef <qais.yousef@arm.com> Change-Id: I3d36f1ebed6ef35a6299af32bbf4462d0353e783 Git-commit: f89ff1404286486643a1ae80f1f22946cdb8d0ee Git-repo: https://android.googlesource.com/kernel/common/ Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
This commit is contained in:
parent
9e864eaf88
commit
09c8865bfc
1 changed files with 10 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue