Re: [PATCH RFC 5/5] sched/fair: remove impossible condition from find_idlest_group_cpu

From: Vincent Guittot
Date: Mon Oct 30 2017 - 12:26:41 EST


On 30 October 2017 at 17:19, Joel Fernandes <joelaf@xxxxxxxxxx> wrote:
> Hi Vincent,
>
> On Mon, Oct 30, 2017 at 9:00 AM, Vincent Guittot
> <vincent.guittot@xxxxxxxxxx> wrote:
>> On 28 October 2017 at 11:59, Joel Fernandes <joelaf@xxxxxxxxxx> wrote:
>>> find_idlest_group_cpu goes through CPUs of a group previous selected by
>>> find_idlest_group. find_idlest_group returns NULL if the local group is the
>>> selected one and doesn't execute find_idlest_group_cpu if the group to which
>>> 'cpu' belongs to is chosen. So we're always guaranteed to call
>>> find_idlest_group_cpu with a group to which cpu is non-local. This makes one of
>>
>> Is this still true in case of overlapping topology ?
>
> Yes, I believe so. As per the code, find_idlest_group will only return
> a group to which this_cpu doesn't belong to. So incase an overlapping
> group was returned by find_idlest_group (instead of NULL), then none
> of the groups (among the set of overlapping groups) is local to
> this_cpu. Incase NULL is returned, then find_idlest_group_cpu doesn't
> execute at all.
>
> Do you agree?

Yes you're right. we skip of all groups to which this_cpu belong to

>
> thanks,
>
> - Joel
>
> [..]