ANDROID: sched/core: Optimize vendor hook placement

Currently, the tick_entry vendor hook in the scheduler tick path is
called before the rq clock is updated.
Change the vendor hook placement to after the clock update so that an
updated clock value is used.

Fixes: ca60d78542 ("Revert "Revert "ANDROID: Sched: Add restricted
vendor hooks for scheduler""")
Signed-off-by: Sai Harshini Nimmala <quic_snimmala@quicinc.com>
Change-Id: Ieee88da1cf803c68212b96b79e45d216d0696d0d
This commit is contained in:
Sai Harshini Nimmala 2022-03-16 23:14:56 -07:00 committed by Todd Kjos
parent a131e0b4b9
commit a4aa38731e

View File

@ -5340,8 +5340,9 @@ void scheduler_tick(void)
rq_lock(rq, &rf);
trace_android_rvh_tick_entry(rq);
update_rq_clock(rq);
trace_android_rvh_tick_entry(rq);
thermal_pressure = arch_scale_thermal_pressure(cpu_of(rq));
update_thermal_load_avg(rq_clock_thermal(rq), rq, thermal_pressure);
curr->sched_class->task_tick(rq, curr, 0);