Re: [PATCH v3 5/5] sched/fair: Fix use of find_idlest_group when local group is idlest

From: Josef Bacik
Date: Thu Aug 31 2017 - 09:55:04 EST


On Thu, Aug 31, 2017 at 12:58:02PM +0100, Brendan Jackman wrote:
> find_idlest_group returns NULL when the local group is idlest. The
> caller then continues the find_idlest_group search at a lower level
> of the current CPU's sched_domain hierarchy. find_idlest_group_cpu is
> not consulted and, crucially, @new_cpu is not updated. This means the
> search is pointless and we return @prev_cpu from select_task_rq_fair.
>
> This is fixed by initialising @new_cpu to @cpu instead of
> @prev_cpu.
>

Reviewed-by: Josef Bacik <jbacik@xxxxxx>

Thanks,

Josef