ANDROID: sched: Add vendor hook for util_est_update
Vendor may have its own estimated utilization. Bug: 170508405 Signed-off-by: Rick Yiu <rickyiu@google.com> Change-Id: I6055907de75ace4586c3ad854d40f42e3bf40147
This commit is contained in:
@@ -205,3 +205,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_set_memory_ro);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_set_memory_rw);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_set_module_permit_before_init);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_set_module_permit_after_init);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_util_est_update);
|
||||
|
@@ -288,6 +288,10 @@ DECLARE_RESTRICTED_HOOK(android_rvh_replace_next_task_fair,
|
||||
TP_PROTO(struct rq *rq, struct task_struct **p, struct sched_entity **se, bool *repick, bool simple),
|
||||
TP_ARGS(rq, p, se, repick, simple), 1);
|
||||
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_util_est_update,
|
||||
TP_PROTO(struct cfs_rq *cfs_rq, struct task_struct *p, bool task_sleep, int *ret),
|
||||
TP_ARGS(cfs_rq, p, task_sleep, ret), 1);
|
||||
|
||||
/* macro versions of hooks are no longer required */
|
||||
|
||||
#endif /* _TRACE_HOOK_SCHED_H */
|
||||
|
@@ -3971,6 +3971,11 @@ static inline void util_est_update(struct cfs_rq *cfs_rq,
|
||||
{
|
||||
long last_ewma_diff;
|
||||
struct util_est ue;
|
||||
int ret = 0;
|
||||
|
||||
trace_android_rvh_util_est_update(cfs_rq, p, task_sleep, &ret);
|
||||
if (ret)
|
||||
return;
|
||||
|
||||
if (!sched_feat(UTIL_EST))
|
||||
return;
|
||||
|
Reference in New Issue
Block a user