ANDROID: Sched: Add restricted vendor hook in update_misfit_status()

Added a hook in update_misfit_status() for our vendor scheduler
logic to move the task to more capable CPU incase,
if old misfit value is not same as current misfit value.

This vendor hook was part of
commit 292f430816
(ANDROID: Sched: Add restricted vendor hooks for scheduler)

But commit 7219ca326a
(Revert "ANDROID: Sched: Add restricted vendor hooks for scheduler")
deleted above vendor hooks stating unused

Adding back above vendor hooks required for EMS.

Bug: 259900798

Change-Id: I9f71b97f673aea12f32fda2dd111d3760394de1f
Signed-off-by: Khalid Shaik <khalid.s@samsung.com>
This commit is contained in:
Khalid Shaik
2022-11-23 21:53:36 +05:30
committed by Treehugger Robot
parent 64b7606115
commit 57e680a1a8
3 changed files with 6 additions and 0 deletions

View File

@@ -185,6 +185,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_sched_fork);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_wake_up_new_task);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_schedule);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_build_perf_domains);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_update_misfit_status);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_cpu_cgroup_attach);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_cpu_cgroup_can_attach);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_cpu_cgroup_online);

View File

@@ -161,6 +161,10 @@ DECLARE_RESTRICTED_HOOK(android_rvh_build_perf_domains,
TP_PROTO(bool *eas_check),
TP_ARGS(eas_check), 1);
DECLARE_RESTRICTED_HOOK(android_rvh_update_misfit_status,
TP_PROTO(struct task_struct *p, struct rq *rq, bool *need_update),
TP_ARGS(p, rq, need_update), 1);
DECLARE_RESTRICTED_HOOK(android_rvh_cpu_cgroup_attach,
TP_PROTO(struct cgroup_taskset *tset),
TP_ARGS(tset), 1);

View File

@@ -4112,6 +4112,7 @@ static inline void update_misfit_status(struct task_struct *p, struct rq *rq)
{
bool need_update = true;
trace_android_rvh_update_misfit_status(p, rq, &need_update);
if (!static_branch_unlikely(&sched_asym_cpucapacity) || !need_update)
return;