ANDROID: sched: Add vendor hook for rt util update
Currently rt task util is not tracked like cfs task, so when a rt task migrates to different cpu, the cpu could not respond with comparable frequency. Add the hook so that vendor could track rt task util to improve the system performance. DISABLE_TOPIC_PROTECTOR Bug: 201261299 Signed-off-by: Rick Yiu <rickyiu@google.com> Change-Id: I2f4e5142c6bc8574ee3558042e1fb0dae13b702d
This commit is contained in:
committed by
Treehugger Robot
parent
c6e1897112
commit
3e15db3d1b
@@ -494,6 +494,10 @@ DECLARE_HOOK(android_vh_prio_restore,
|
||||
TP_PROTO(int saved_prio),
|
||||
TP_ARGS(saved_prio));
|
||||
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_update_rt_rq_load_avg,
|
||||
TP_PROTO(u64 now, struct rq *rq, struct task_struct *tsk, int running),
|
||||
TP_ARGS(now, rq, tsk, running), 1);
|
||||
|
||||
/* macro versions of hooks are no longer required */
|
||||
|
||||
#endif /* _TRACE_HOOK_SCHED_H */
|
||||
|
||||
@@ -1805,6 +1805,7 @@ static inline void set_next_task_rt(struct rq *rq, struct task_struct *p, bool f
|
||||
*/
|
||||
if (rq->donor->sched_class != &rt_sched_class)
|
||||
update_rt_rq_load_avg(rq_clock_pelt(rq), rq, 0);
|
||||
trace_android_rvh_update_rt_rq_load_avg(rq_clock_pelt(rq), rq, p, 0);
|
||||
|
||||
rt_queue_push_tasks(rq);
|
||||
}
|
||||
@@ -1865,6 +1866,7 @@ static void put_prev_task_rt(struct rq *rq, struct task_struct *p, struct task_s
|
||||
update_curr_rt(rq);
|
||||
|
||||
update_rt_rq_load_avg(rq_clock_pelt(rq), rq, 1);
|
||||
trace_android_rvh_update_rt_rq_load_avg(rq_clock_pelt(rq), rq, p, 1);
|
||||
|
||||
if (task_is_blocked(p))
|
||||
return;
|
||||
@@ -2783,6 +2785,7 @@ static void task_tick_rt(struct rq *rq, struct task_struct *p, int queued)
|
||||
|
||||
update_curr_rt(rq);
|
||||
update_rt_rq_load_avg(rq_clock_pelt(rq), rq, 1);
|
||||
trace_android_rvh_update_rt_rq_load_avg(rq_clock_pelt(rq), rq, p, 1);
|
||||
|
||||
watchdog(rq, p);
|
||||
|
||||
|
||||
@@ -128,3 +128,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_dequeue_entity_delayed);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mmput);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_prio_inheritance);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_prio_restore);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_update_rt_rq_load_avg);
|
||||
|
||||
Reference in New Issue
Block a user