Re: [RFC PATCH 0/2] Adjust CFS loadbalance to adapt QEMU CPU topology.

From: Peter Zijlstra
Date: Fri Jul 21 2023 - 05:13:57 EST


On Fri, Jul 21, 2023 at 10:58:50AM +0800, Kenan.Liu wrote:

> > > As the current kernel scheduler
> > > implementation, hyperthread with an even ID number will be picked up in a much
> > > higher probability during load-balancing and load-deploying.
> > How so?
>
>
> The SMT topology in qemu native x86 CPU model is (0,1),…,(n,n+1),…,
> but nomarlly seen SMT topo in physical machine is like (0,n),(1,n+1),…,
> n means the total core number of the machine.

That is only common on Intel hardware, AMD (and some Intel) will in fact
enumerate SMT like Qemu does.