ANDROID: GKI: sched: add rvh for new cfs task util
A vendor hook is added in post_init_entity_util_avg before
a new cfs task's util is attached to cfs_rq's util so that
vendors can gather and modify se's information to modify
scheduling behavior and DVFS as they want.
trace_android_rvh_new_task_stats is not a proper hook because
it is called after the task's util is attached to cfs_rq's util,
which means updating cfs_rq's sched_avg and DVFS request are done.
Bug: 184219858
Signed-off-by: Choonghoon Park <choong.park@samsung.com>
Change-Id: I2deaa93297f8464895978496c9838cdffaa35b7f
(cherry picked from commit 1eea1cbdd3
)
This commit is contained in:
parent
07efa91ae9
commit
ca0b1abfc5
@ -367,6 +367,9 @@ DECLARE_HOOK(android_vh_dup_task_struct,
|
||||
TP_PROTO(struct task_struct *tsk, struct task_struct *orig),
|
||||
TP_ARGS(tsk, orig));
|
||||
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_post_init_entity_util_avg,
|
||||
TP_PROTO(struct sched_entity *se),
|
||||
TP_ARGS(se), 1);
|
||||
/* macro versions of hooks are no longer required */
|
||||
|
||||
#endif /* _TRACE_HOOK_SCHED_H */
|
||||
|
@ -869,6 +869,9 @@ void post_init_entity_util_avg(struct task_struct *p)
|
||||
}
|
||||
|
||||
sa->runnable_avg = sa->util_avg;
|
||||
|
||||
/* Hook before this se's util is attached to cfs_rq's util */
|
||||
trace_android_rvh_post_init_entity_util_avg(se);
|
||||
}
|
||||
|
||||
#else /* !CONFIG_SMP */
|
||||
|
@ -94,3 +94,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_account_process_tick_gran);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_account_task_time);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_dup_task_struct);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_irqtime_account_process_tick);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_post_init_entity_util_avg);
|
||||
|
Loading…
Reference in New Issue
Block a user