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
This commit is contained in:
parent
f09589401c
commit
1eea1cbdd3
@ -188,3 +188,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_selinux_is_initialized);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_check_mmap_file);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_check_file_open);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_check_bpf_syscall);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_post_init_entity_util_avg);
|
||||
|
@ -306,6 +306,10 @@ DECLARE_RESTRICTED_HOOK(android_rvh_dequeue_task_fair,
|
||||
TP_PROTO(struct rq *rq, struct task_struct *p, int flags),
|
||||
TP_ARGS(rq, p, flags), 1);
|
||||
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_post_init_entity_util_avg,
|
||||
TP_PROTO(struct sched_entity *se),
|
||||
TP_ARGS(se), 1);
|
||||
|
||||
#endif /* _TRACE_HOOK_SCHED_H */
|
||||
/* This part must be outside protection */
|
||||
#include <trace/define_trace.h>
|
||||
|
@ -828,6 +828,8 @@ void post_init_entity_util_avg(struct task_struct *p)
|
||||
return;
|
||||
}
|
||||
|
||||
/* Hook before this se's util is attached to cfs_rq's util */
|
||||
trace_android_rvh_post_init_entity_util_avg(se);
|
||||
attach_entity_cfs_rq(se);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user