sched/walt: reject queue_wakelist() is cpu is same as waker cpu

The upstream code has a WARN when wakelist is being enforced on the same
cpu where the waker runs. Although WALT tries its best to skip the
current cpu during many_wakeups situation, it may have to put the task
on it during highload/offline or 32 bit situations.

Simply disable queue_wakelist() if we wakeup the task on the waker cpu.

Change-Id: Ie13f1156bf0389570dbe0fbac70e271db2b9b211
Signed-off-by: Abhijeet Dharmapurikar <quic_adharmap@quicinc.com>
Signed-off-by: Shaleen Agrawal <quic_shalagra@quicinc.com>
This commit is contained in:
Abhijeet Dharmapurikar 2022-05-26 15:29:42 -07:00 committed by Rishabh Bhatnagar
parent 0a354ab6ac
commit 421ed6261a

View File

@ -4411,11 +4411,12 @@ static void android_rvh_sched_fork_init(void *unused, struct task_struct *p)
__sched_fork_init(p);
}
static void android_rvh_ttwu_cond(void *unused, bool *cond)
static void android_rvh_ttwu_cond(void *unused, int cpu, bool *cond)
{
if (unlikely(walt_disabled))
return;
*cond = sysctl_sched_many_wakeup_threshold < WALT_MANY_WAKEUP_DEFAULT;
*cond = (sysctl_sched_many_wakeup_threshold < WALT_MANY_WAKEUP_DEFAULT) &&
(cpu != smp_processor_id());
}
static void android_rvh_sched_exec(void *unused, bool *cond)