ANDROID: sched: WALT: Refactor cumulative runnable average fixup

When a runnable task window is rolled over, it's CPU cumulative
runnable average needs to be updated accordingly. Currently this
is handled in a common function for all scheduling classes. However
when CFS_BANDWIDTH is enabled, fair scheduling class needs special
handling. As a preparation step, add a callback in sched_class
for updating the cumulative runnable average. The subsequent patches
make use of this callback and implement a different method for
fair scheduling class.

Bug: 139071966
Change-Id: Iffa88ab89254932177b1ea4eeaf12ec305c1c9c6
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Todd Kjos <tkjos@google.com>
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 098e3bd..96d5ccd 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -1453,6 +1453,11 @@
 #ifdef CONFIG_FAIR_GROUP_SCHED
 	void (*task_change_group) (struct task_struct *p, int type);
 #endif
+#ifdef CONFIG_SCHED_WALT
+	void (*fixup_cumulative_runnable_avg)(struct rq *rq,
+					      struct task_struct *task,
+					      u64 new_task_load);
+#endif
 };
 
 static inline void put_prev_task(struct rq *rq, struct task_struct *prev)