Re: wakeup_affine_weight() is b0rked - was Re: [PATCH 2/2] sched/fair: Scale wakeup granularity relative to nr_running
From: Mike Galbraith
Date: Sun Oct 03 2021 - 21:49:34 EST
On Mon, 2021-10-04 at 10:06 +1300, Barry Song wrote:
>
> What is the topology of your hardware?
It's an i4790 quad+smt.
> shouldn't select_idle_sibling find some other idle CPUs in CPU7's LLC
> domain? Why are you always getting CPU7?
The box is busy. It's running a parallel kbuild as well as the
desktop, firefox and their various minions (et al.. kthreads).
> one thing bothering me is that we are using the load of a single CPU
> in wake_affine_weight(), but we are actually scanning the whole LLC
> afterwards.
The question wake_affine() is answering is one from the bad old days of
SMP, of pull the task to toasty data, or make it drag that data across
horrible hardware. LLC came into the equation much later. With it, and
big boxen with several of them, the wake affine question became mostly
about which LLC, but not solely. There's still L2 to consider, and
there's even a valid time to stack two communicating tasks like in the
bad old SMP days.. say when there would be a man-in-the-middle of the
conversation if wakee were to be left on its previous CPU.
-Mike