Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sched/topology: Remove SHARED_CHILD from ASYM_PACKING

Only x86 and Power7 use ASYM_PACKING. They use it differently.

Power7 has cores of equal priority, but the SMT siblings of a core have
different priorities. Parent scheduling domains do not need (nor have) the
ASYM_PACKING flag. SHARED_CHILD is not needed. Using SHARED_PARENT would
cause the topology debug code to complain.

X86 has cores of different priority, but all the SMT siblings of the core
have equal priority. It needs ASYM_PACKING at the MC level, but not at the
SMT level (it also needs it at upper levels if they have scheduling groups
of different priority). Removing ASYM_PACKING from the SMT domain causes
the topology debug code to complain.

Remove SHARED_CHILD for now. We still need a topology check that satisfies
both architectures.

Suggested-by: Valentin Schneider <vschneid@redhat.com>
Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Zhang Rui <rui.zhang@intel.com>
Link: https://lore.kernel.org/r/20230406203148.19182-10-ricardo.neri-calderon@linux.intel.com

authored by

Ricardo Neri and committed by
Peter Zijlstra
ca528cc5 40b4d3dc

+1 -4
+1 -4
include/linux/sched/sd_flags.h
··· 132 132 /* 133 133 * Place busy tasks earlier in the domain 134 134 * 135 - * SHARED_CHILD: Usually set on the SMT level. Technically could be set further 136 - * up, but currently assumed to be set from the base domain 137 - * upwards (see update_top_cache_domain()). 138 135 * NEEDS_GROUPS: Load balancing flag. 139 136 */ 140 - SD_FLAG(SD_ASYM_PACKING, SDF_SHARED_CHILD | SDF_NEEDS_GROUPS) 137 + SD_FLAG(SD_ASYM_PACKING, SDF_NEEDS_GROUPS) 141 138 142 139 /* 143 140 * Prefer to place tasks in a sibling domain