ANDROID: sched: Add vendor hooks for update_topology

Add a vendor hook for modules to know when the topology
code has determined the max capacity of cpus.

Bug: 187234873
Change-Id: Ia3e22479059d2e57500cbdd46504aa4773af6e4a
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
This commit is contained in:
Abhijeet Dharmapurikar
2021-05-04 12:26:13 -07:00
committed by Quentin Perret
parent 26e61ea36d
commit f7128c7533
3 changed files with 6 additions and 0 deletions

View File

@@ -268,3 +268,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_prepare_update_load_avg_se);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_finish_update_load_avg_se); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_finish_update_load_avg_se);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_selinux_is_initialized); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_selinux_is_initialized);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_tune_inactive_ratio); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_tune_inactive_ratio);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_update_topology_flags_workfn);

View File

@@ -129,6 +129,7 @@ static void update_topology_flags_workfn(struct work_struct *work)
{ {
update_topology = 1; update_topology = 1;
rebuild_sched_domains(); rebuild_sched_domains();
trace_android_vh_update_topology_flags_workfn(NULL);
pr_debug("sched_domain hierarchy rebuilt, flags updated\n"); pr_debug("sched_domain hierarchy rebuilt, flags updated\n");
update_topology = 0; update_topology = 0;
} }

View File

@@ -16,6 +16,10 @@ DECLARE_HOOK(android_vh_arch_set_freq_scale,
unsigned long max, unsigned long *scale), unsigned long max, unsigned long *scale),
TP_ARGS(cpus, freq, max, scale)); TP_ARGS(cpus, freq, max, scale));
DECLARE_HOOK(android_vh_update_topology_flags_workfn,
TP_PROTO(void *unused),
TP_ARGS(unused));
/* macro versions of hooks are no longer required */ /* macro versions of hooks are no longer required */
#endif /* _TRACE_HOOK_TOPOLOGY_H */ #endif /* _TRACE_HOOK_TOPOLOGY_H */