mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
ANDROID: sched: Add env->cpus to android_rvh_sched_nohz_balancer_kick
android_rvh_sched_nohz_balancer_kick hook allows vendor modules to select the busiest CPU in a group during load balance. When the load balancer could not pull tasks from this busiest CPU due to affinity restriction, the CPU is cleared from env->cpu. This must be passed to the vendor module, otherwise we keep selecting the exempted CPU as the busiest CPU. Bug: 174338902 Change-Id: Iedaa389a51849da4c3e094d731fe5e39cd909d81 Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
This commit is contained in:
committed by
Quentin Perret
parent
5b0b1850d2
commit
dc543a5b2a
@@ -92,8 +92,9 @@ DECLARE_RESTRICTED_HOOK(android_rvh_sched_nohz_balancer_kick,
|
||||
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_find_busiest_queue,
|
||||
TP_PROTO(int dst_cpu, struct sched_group *group,
|
||||
struct rq **busiest, int *done),
|
||||
TP_ARGS(dst_cpu, group, busiest, done), 1);
|
||||
struct cpumask *env_cpus, struct rq **busiest,
|
||||
int *done),
|
||||
TP_ARGS(dst_cpu, group, env_cpus, busiest, done), 1);
|
||||
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_migrate_queued_task,
|
||||
TP_PROTO(struct rq *rq, struct rq_flags *rf,
|
||||
@@ -119,7 +120,7 @@ DECLARE_RESTRICTED_HOOK(android_rvh_migrate_queued_task,
|
||||
#define trace_android_vh_jiffies_update(unused)
|
||||
#define trace_android_rvh_sched_newidle_balance(this_rq, rf, pulled_task, done)
|
||||
#define trace_android_rvh_sched_nohz_balancer_kick(rq, flags, done)
|
||||
#define trace_android_rvh_find_busiest_queue(dst_cpu, group, busiest, 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)
|
||||
#endif
|
||||
#endif /* _TRACE_HOOK_SCHED_H */
|
||||
|
||||
@@ -9393,7 +9393,8 @@ static struct rq *find_busiest_queue(struct lb_env *env,
|
||||
unsigned int busiest_nr = 0;
|
||||
int i, done = 0;
|
||||
|
||||
trace_android_rvh_find_busiest_queue(env->dst_cpu, group, &busiest, &done);
|
||||
trace_android_rvh_find_busiest_queue(env->dst_cpu, group, env->cpus,
|
||||
&busiest, &done);
|
||||
if (done)
|
||||
return busiest;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user