Re: [PATCH v3 4/5] sched/fair: Fix use of find_idlest_group when no groups are allowed

From: Josef Bacik
Date: Thu Aug 31 2017 - 09:54:47 EST


On Thu, Aug 31, 2017 at 12:58:01PM +0100, Brendan Jackman wrote:
> When p is allowed on none of the CPUs in the sched_domain, we
> currently return NULL from find_idlest_group, and pointlessly
> continue the search on lower sched_domain levels (where p is also not
> allowed) before returning prev_cpu regardless (as we have not updated
> new_cpu).
>
> Add an explicit check for this case, and a comment to
> find_idlest_group. Now when find_idlest_group returns NULL, it always
> means that the local group is allowed and idlest.
>

Reviewed-by: Josef Bacik <jbacik@xxxxxx>

Thanks,

Josef