ANDROID: Add new hook to enable overriding uclamp_validate()
We want to add more special values, specifically for uclamp_max so that it can be set automatically to the most efficient value based on the core it's running on. Bug: 297343949 Signed-off-by: Qais Yousef <qyousef@google.com> Change-Id: I57343c4544f6cac621c855cbb94de0b8d80c51fa
This commit is contained in:
parent
b57e3c1d99
commit
5762974151
@ -321,6 +321,11 @@ DECLARE_HOOK(android_vh_setscheduler_uclamp,
|
||||
TP_PROTO(struct task_struct *tsk, int clamp_id, unsigned int value),
|
||||
TP_ARGS(tsk, clamp_id, value));
|
||||
|
||||
DECLARE_HOOK(android_vh_uclamp_validate,
|
||||
TP_PROTO(struct task_struct *p, const struct sched_attr *attr,
|
||||
bool user, int *ret, bool *done),
|
||||
TP_ARGS(p, attr, user, ret, done));
|
||||
|
||||
DECLARE_HOOK(android_vh_update_topology_flags_workfn,
|
||||
TP_PROTO(void *unused),
|
||||
TP_ARGS(unused));
|
||||
|
@ -1884,6 +1884,12 @@ static int uclamp_validate(struct task_struct *p,
|
||||
{
|
||||
int util_min = p->uclamp_req[UCLAMP_MIN].value;
|
||||
int util_max = p->uclamp_req[UCLAMP_MAX].value;
|
||||
bool done = false;
|
||||
int ret = 0;
|
||||
|
||||
trace_android_vh_uclamp_validate(p, attr, user, &ret, &done);
|
||||
if (done)
|
||||
return ret;
|
||||
|
||||
if (attr->sched_flags & SCHED_FLAG_UTIL_CLAMP_MIN) {
|
||||
util_min = attr->sched_util_min;
|
||||
|
@ -99,3 +99,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_irqtime_account_process_tick);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_post_init_entity_util_avg);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_effective_cpu_util);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mmput);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_uclamp_validate);
|
||||
|
Loading…
Reference in New Issue
Block a user