ANDROID: cpu/hotplug: vendor hook for resume cpus

Incorporate a vendor hook in the resume cpus path
so that vendor specific activities may take place.

Bug: 161210528
Change-Id: I74d03247491b004e891dbcfe06a478d00a95ba9f
Signed-off-by: Stephen Dickey <dickey@codeaurora.org>
This commit is contained in:
Stephen Dickey 2020-12-01 11:36:27 -08:00 committed by Todd Kjos
parent 1d3a64fbd2
commit 782131fed0
3 changed files with 13 additions and 0 deletions

View File

@ -84,6 +84,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_sched_newidle_balance);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_sched_nohz_balancer_kick);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_find_busiest_queue);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_migrate_queued_task);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_resume_cpus);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_find_energy_efficient_cpu);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_set_sugov_sched_attr);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_set_iowait);

View File

@ -102,6 +102,10 @@ DECLARE_RESTRICTED_HOOK(android_rvh_migrate_queued_task,
int *detached),
TP_ARGS(rq, rf, p, new_cpu, detached), 1);
DECLARE_RESTRICTED_HOOK(android_rvh_resume_cpus,
TP_PROTO(struct cpumask *cpus, int *err),
TP_ARGS(cpus, err), 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);
@ -206,6 +210,7 @@ DECLARE_RESTRICTED_HOOK(android_rvh_update_misfit_status,
#define trace_android_rvh_sched_nohz_balancer_kick(rq, flags, done)
#define trace_android_rvh_find_busiest_queue(dst_cpu, group, env_cpus, busiest, done)
#define trace_android_rvh_migrate_queued_task(rq, rf, p, new_cpu, detached)
#define trace_android_rvh_resume_cpus(cpus, err)
#define trace_android_rvh_find_energy_efficient_cpu(p, prev_cpu, sync, new_cpu)
#define trace_android_vh_set_sugov_sched_attr(attr)
#define trace_android_rvh_set_iowait(p, should_iowait_boost)

View File

@ -39,6 +39,9 @@
#define CREATE_TRACE_POINTS
#include <trace/events/cpuhp.h>
#undef CREATE_TRACE_POINTS
#include <trace/hooks/sched.h>
#include "smpboot.h"
/**
@ -1257,6 +1260,10 @@ int resume_cpus(struct cpumask *cpus)
for_each_cpu(cpu, cpus)
set_cpu_active(cpu, true);
trace_android_rvh_resume_cpus(cpus, &err);
if (err)
goto err_cpu_maps_update;
/* Lazy Resume. Build domains immediately instead of scheduling
* a workqueue. This is so that the cpu can pull load when
* sent a load balancing kick.