2022-09-05 17:46:52

by Sudeep Holla

[permalink] [raw]
Subject: Re: [PATCH v3] arch_topology: Make cluster topology span at least SMT CPUs

On Mon, Sep 05, 2022 at 08:26:15PM +0800, Yicong Yang wrote:
> From: Yicong Yang <[email protected]>
>
> Currently cpu_clustergroup_mask() will return CPU mask if cluster span more
> or the same CPUs as cpu_coregroup_mask(). This will result topology borken
> on non-Cluster SMT machines when building with CONFIG_SCHED_CLUSTER=y.
>
> Test with:
> qemu-system-aarch64 -enable-kvm -machine virt \
> -net none \
> -cpu host \
> -bios ./QEMU_EFI.fd \
> -m 2G \
> -smp 48,sockets=2,cores=12,threads=2 \
> -kernel $Image \
> -initrd $Rootfs \
> -nographic
> -append "rdinit=init console=ttyAMA0 sched_verbose loglevel=8"
>
> We'll get below error:
> [ 3.084568] BUG: arch topology borken
> [ 3.084570] the SMT domain not a subset of the CLS domain
>
> Since cluster is a level higher than SMT, fix this by making cluster
> spans at least SMT CPUs.
>
> Cc: Sudeep Holla <[email protected]>

Sorry for missing to figure this out earlier and thanks for fixing it.
Reviewed-by: Sudeep Holla <[email protected]>

--
Regards,
Sudeep