Re: [PATCH] sched/fair: Prefer fully-idle SMT cores in asym-capacity idle selection
From: Andrea Righi
Date: Thu Mar 19 2026 - 07:17:23 EST
Hi Vincent,
On Thu, Mar 19, 2026 at 08:17:06AM +0100, Vincent Guittot wrote:
> On Wed, 18 Mar 2026 at 11:31, Andrea Righi <arighi@xxxxxxxxxx> wrote:
> >
> > Hi Vincent,
> >
> > On Wed, Mar 18, 2026 at 10:41:15AM +0100, Vincent Guittot wrote:
> > > On Wed, 18 Mar 2026 at 10:22, Andrea Righi <arighi@xxxxxxxxxx> wrote:
> > > >
> > > > On systems with asymmetric CPU capacity (e.g., ACPI/CPPC reporting
> > > > different per-core frequencies), the wakeup path uses
> > > > select_idle_capacity() and prioritizes idle CPUs with higher capacity
> > > > for better task placement. However, when those CPUs belong to SMT cores,
> > >
> > > Interesting, which kind of system has both SMT and SD_ASYM_CPUCAPACITY
> > > ? I thought both were never set simultaneously and SD_ASYM_PACKING was
> > > used for system involving SMT like x86
> >
> > It's an NVIDIA platform (not publicly available yet), where the firmware
> > exposes different CPU capacities and has SMT enabled, so both
> > SD_ASYM_CPUCAPACITY and SMT are present. I'm not sure whether the final
> > firmware release will keep this exact configuration (there's a good chance
> > it will), so I'm targeting it to be prepared.
>
> That's probably not the only place where SD_ASYM_CPUCAPACITY will fail
> with SMT. The misfit is another place as an example
Yeah, that's right, with SD_ASYM_CPUCAPACITY + SMT when a misfit task is
moved from a "small" CPU to a "big" CPU, if the big CPU has a busy sibling,
its effective capacity is much lower than its nominal capacity.
Maybe when SMT is active, we could allow pulling a misfit task only when
dst_cpu is on a fully idle core. That's a simple change, I'll run some
tests with this, but as you said there might be other places to fix as
well.
Thanks,
-Andrea