sched: Re-fix lock_cpus mask setting during IC migrations

In an earlier fix, we intended to clear lock CPUs with a
given cluster if and only all CPUs belonging to the
cluster did not have a notification pending.

However, the fix was incomplete, as we were continuing to do the
opposite, resulting in undesired behavior.

Fixes: 95d58bdfe8d ("sched/walt: Fix lock_cpus mask setting during IC migrations")
Change-Id: Ia3c0d886a2a27b8f4cf8d6f60673aeb7213d5fb9
Signed-off-by: Shaleen Agrawal <quic_shalagra@quicinc.com>
This commit is contained in:
Shaleen Agrawal 2022-04-14 16:07:45 -07:00 committed by Rishabh Bhatnagar
parent d0ba68e336
commit affc93eb8a

View File

@ -3629,18 +3629,18 @@ static inline void irq_work_restrict_to_mig_clusters(cpumask_t *lock_cpus)
int cpu;
for_each_sched_cluster(cluster) {
bool keep = false;
bool keep_locked = false;
for_each_cpu(cpu, &cluster->cpus) {
rq = cpu_rq(cpu);
wrq = (struct walt_rq *)rq->android_vendor_data1;
/* remove this cluster if it's not being notified */
if (!wrq->notif_pending) {
keep = true;
if (wrq->notif_pending) {
keep_locked = true;
break;
}
}
if (!keep)
if (!keep_locked)
cpumask_andnot(lock_cpus, lock_cpus, &cluster->cpus);
}
}