Re: [RFC PATCH 0/3] Rework CPU capacity asymmetry detection
From: Valentin Schneider
Date: Wed Apr 21 2021 - 15:58:27 EST
On 16/04/21 14:01, Beata Michalska wrote:
> Verified on (mostly):
> - QEMU (version 4.2.1) with variants of possible asymmetric topologies
> - machine: virt
> - modifying the device-tree 'cpus' node for virt machine:
>
> qemu-system-aarch64 -kernel $KERNEL_IMG
> -drive format=qcow2,file=$IMAGE
> -append 'root=/dev/vda earlycon console=ttyAMA0 sched_debug
> loglevel=15 kmemleak=on' -m 2G --nographic -cpu cortex-a57
> -machine virt -smp cores=6 -machine dumpdtb=$CUSTOM_DTB.dtb
>
> $KERNEL_PATH/scripts/dtc/dtc -I dtb -O dts $CUSTOM_DTB.dts >
> $CUSTOM_DTB.dtb
>
> (modify the dts)
>
> $KERNEL_PATH/scripts/dtc/dtc -I dts -O dtb $CUSTOM_DTB.dts >
> $CUSTOM_DTB.dtb
>
> qemu-system-aarch64 -kernel $KERNEL_IMG
> -drive format=qcow2,file=$IMAGE
> -append 'root=/dev/vda earlycon console=ttyAMA0 sched_debug
> loglevel=15 kmemleak=on' -m 2G --nographic -cpu cortex-a57
> -machine virt -smp cores=6 -machine dtb=$CUSTOM_DTB.dtb
>
Thanks to your QEMU wizardry, I've also tested this on a few funky
topologies such as:
DIE [ ]
MC [ ][ ]
0 1 2 3 4 5 6 7
L L M L L M B B
and
DIE [ ]
MC [ ][ ]
0 1 2 3 4 5
L L M M B B
+ some hotplug ops, and the resulting SD_ flags all made sense to me.
Tested-by: Valentin Schneider <valentin.schneider@xxxxxxx>
For patches 1, 3:
Reviewed-by: Valentin Schneider <valentin.schneider@xxxxxxx>
>
> Beata Michalska (3):
> sched/core: Introduce SD_ASYM_CPUCAPACITY_FULL sched_domain flag
> sched/topology: Rework CPU capacity asymmetry detection
> sched/doc: Update the CPU capacity asymmetry bits
>
> Documentation/scheduler/sched-capacity.rst | 6 +-
> Documentation/scheduler/sched-energy.rst | 2 +-
> include/linux/sched/sd_flags.h | 10 +
> kernel/sched/topology.c | 339 +++++++++++++++++++++++++----
> 4 files changed, 314 insertions(+), 43 deletions(-)
>
> --
> 2.7.4