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: 344826816 Bug: 297343949 Bug: 283761535 Signed-off-by: Qais Yousef <qyousef@google.com> Change-Id: I57343c4544f6cac621c855cbb94de0b8d80c51fa (cherry picked from commit 57629741518b30501e7a653bb9ca05b929550651) [Remove user arg from uclamp_validate as it no longer part of the function. Trivial conflict in vendor_hooks.c due to code ordering.] Signed-off-by: Qais Yousef <qyousef@google.com>
This commit is contained in:
committed by
Treehugger Robot
parent
390c2b429d
commit
124897124a
@@ -322,6 +322,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,
|
||||
int *ret, bool *done),
|
||||
TP_ARGS(p, attr, ret, done));
|
||||
|
||||
DECLARE_HOOK(android_vh_update_topology_flags_workfn,
|
||||
TP_PROTO(void *unused),
|
||||
TP_ARGS(unused));
|
||||
|
||||
@@ -358,6 +358,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, &ret, &done);
|
||||
if (done)
|
||||
return ret;
|
||||
|
||||
if (attr->sched_flags & SCHED_FLAG_UTIL_CLAMP_MIN) {
|
||||
util_min = attr->sched_util_min;
|
||||
|
||||
@@ -131,4 +131,5 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_prio_restore);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_update_rt_rq_load_avg);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_set_sugov_sched_attr);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_set_iowait);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_uclamp_validate);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user