From d31ea0950a30a34d51fa347dcec0f41f414fd9fc Mon Sep 17 00:00:00 2001 From: Satya Durga Srinivasu Prabhala Date: Sun, 13 Dec 2020 06:18:54 -0800 Subject: [PATCH] ANDROID: sched/fair: fix place_entity() vendor hook place_entity() vendor hook is meant to tweak vruntime by vendor modules as needed, but with current form of the hook that is not possible as vruntime is passed by it's value. Fix it by switching to pass by reference. Bug: 175448877 Change-Id: Ibb51592f94da31019fa98a6767d080ec61daafe6 Signed-off-by: Satya Durga Srinivasu Prabhala --- include/trace/hooks/sched.h | 2 +- kernel/sched/fair.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/trace/hooks/sched.h b/include/trace/hooks/sched.h index f5c07afdbbcb..f16ec7814123 100644 --- a/include/trace/hooks/sched.h +++ b/include/trace/hooks/sched.h @@ -179,7 +179,7 @@ DECLARE_RESTRICTED_HOOK(android_rvh_account_irq, struct sched_entity; DECLARE_RESTRICTED_HOOK(android_rvh_place_entity, - TP_PROTO(struct sched_entity *se, u64 vruntime), + TP_PROTO(struct sched_entity *se, u64 *vruntime), TP_ARGS(se, vruntime), 1); DECLARE_RESTRICTED_HOOK(android_rvh_update_cpu_capacity, diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 5f8da10e1688..712b7f2a1f73 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -4137,7 +4137,7 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial) thresh >>= 1; vruntime -= thresh; - trace_android_rvh_place_entity(se, vruntime); + trace_android_rvh_place_entity(se, &vruntime); } /* ensure we never gain time by being placed backwards. */