sched:/fair: check cpu_allowed mask when find target

Current find best target cpu is not check cpu_allowed mask, so
it is possible to place the task on wrong cpu, add cpu mask
check when find best target.

Change-Id: I8075657fa67704ab8d9d94d542a7983bcf8d034f
Signed-off-by: Biao Long <blong@codeaurora.org>
This commit is contained in:
Biao Long 2020-08-13 17:35:28 +08:00
commit 9475145361

3
kernel/sched/fair.c Executable file → Normal file
View file

@ -6575,6 +6575,9 @@ static void walt_find_best_target(struct sched_domain *sd, cpumask_t *cpus,
long spare_cap;
int idle_idx = INT_MAX;
if (!cpumask_test_cpu(i, &p->cpus_mask))
continue;
trace_sched_cpu_util(i);
if (!cpu_active(i) || cpu_isolated(i))