mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
ANDROID: sched: Add vendor hooks for find_energy_efficient_cpu
Add hooks for vendor specific find_energy_efficient_cpu logic.
Bug: 170507310
Bug: 265387484
Signed-off-by: Rick Yiu <rickyiu@google.com>
Change-Id: I064b501017e32d4f22f8128bed8bf3a1508ab15b
(cherry picked from commit 2f108e2ec6e89609cbae32c5d13d6ad9f2e858cb)
Signed-off-by: Will McVicker <willmcvicker@google.com>
(cherry picked from commit 147a9b3d9e)
Signed-off-by: Han Lin <han.lin@mediatek.com>
This commit is contained in:
committed by
Treehugger Robot
parent
db0cabd41a
commit
cbcd3a6460
@@ -329,6 +329,10 @@ DECLARE_RESTRICTED_HOOK(android_rvh_find_new_ilb,
|
||||
TP_PROTO(struct cpumask *nohz_idle_cpus_mask, int *ilb),
|
||||
TP_ARGS(nohz_idle_cpus_mask, ilb), 1);
|
||||
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_find_energy_efficient_cpu,
|
||||
TP_PROTO(struct task_struct *p, int prev_cpu, int sync, int *new_cpu),
|
||||
TP_ARGS(p, prev_cpu, sync, new_cpu), 1);
|
||||
|
||||
/* macro versions of hooks are no longer required */
|
||||
|
||||
#endif /* _TRACE_HOOK_SCHED_H */
|
||||
|
||||
@@ -7082,6 +7082,11 @@ static int find_energy_efficient_cpu(struct task_struct *p, int prev_cpu, int sy
|
||||
struct sched_domain *sd;
|
||||
struct perf_domain *pd;
|
||||
struct energy_env eenv;
|
||||
int new_cpu = INT_MAX;
|
||||
|
||||
trace_android_rvh_find_energy_efficient_cpu(p, prev_cpu, sync, &new_cpu);
|
||||
if (new_cpu != INT_MAX)
|
||||
return new_cpu;
|
||||
|
||||
sync_entity_load_avg(&p->se);
|
||||
|
||||
|
||||
@@ -85,3 +85,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_update_thermal_stats);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_do_wake_up_sync);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_set_wake_flags);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_find_new_ilb);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_find_energy_efficient_cpu);
|
||||
|
||||
Reference in New Issue
Block a user