Re: [PATCH 5/6] sched/fair: Consider the idle state of the whole core for load balance

From: Tim Chen
Date: Fri May 05 2023 - 18:49:33 EST


On Fri, 2023-05-05 at 15:17 +0800, Hillf Danton wrote:
> On 4 May 2023 09:09:55 -0700 Tim Chen <tim.c.chen@xxxxxxxxxxxxxxx>
> > From: Ricardo Neri <ricardo.neri-calderon@xxxxxxxxxxxxxxx>
> >
> > should_we_balance() traverses the group_balance_mask (AND'ed with lb_env::
> > cpus) starting from lower numbered CPUs looking for the first idle CPU.
> >
> > In hybrid x86 systems, the siblings of SMT cores get CPU numbers, before
> > non-SMT cores:
> >
> > [0, 1] [2, 3] [4, 5] 5 6 7 8
> > b i b i b i b i i i
> >
> > In the figure above, CPUs in brackets are siblings of an SMT core. The
> > rest are non-SMT cores. 'b' indicates a busy CPU, 'i' indicates an
> > idle CPU.
>
> Better if l2-cache affinity is added in the diagram above. And better
> again if the diagram is available upon introducing hybrid x86 in the
> cover letter.

Good suggestion. Will update the diagram and add it to cover letter.

Tim