ANDROID: sched: Add parameter to android_rvh_schedule.
Checking whether the ui and render threads are preempted during frame drawing,then adjusting the prority and core selection if they are preempted,because we expect the threads to be executed first.By introducing the sched_mode parameter, we can check the prev thread preemption status in the hook, and judging important threads for executing business logic. Bug: 285166029 Change-Id: I6af31dff4c9032940c7f1c991a25a49ebbeac7a8 Signed-off-by: Dezhi Huang <huangdezhi@hihonor.com>
This commit is contained in:
parent
d4dd4d9f19
commit
fcc5e942e0
@ -161,8 +161,9 @@ DECLARE_RESTRICTED_HOOK(android_rvh_tick_entry,
|
||||
TP_ARGS(rq), 1);
|
||||
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_schedule,
|
||||
TP_PROTO(struct task_struct *prev, struct task_struct *next, struct rq *rq),
|
||||
TP_ARGS(prev, next, rq), 1);
|
||||
TP_PROTO(unsigned int sched_mode, struct task_struct *prev,
|
||||
struct task_struct *next, struct rq *rq),
|
||||
TP_ARGS(sched_mode, prev, next, rq), 1);
|
||||
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_sched_cpu_starting,
|
||||
TP_PROTO(int cpu),
|
||||
|
@ -6638,7 +6638,7 @@ static void __sched notrace __schedule(unsigned int sched_mode)
|
||||
rq->last_seen_need_resched_ns = 0;
|
||||
#endif
|
||||
|
||||
trace_android_rvh_schedule(prev, next, rq);
|
||||
trace_android_rvh_schedule(sched_mode, prev, next, rq);
|
||||
if (likely(prev != next)) {
|
||||
rq->nr_switches++;
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user