• Gautham R. Shenoy's avatar
    powerpc: Use cpu_smallcore_sibling_mask at SMT level on bigcores · 8e8a31d7
    Gautham R. Shenoy authored
    POWER9 SMT8 cores consist of two groups of threads, where threads in
    each group shares L1-cache. The scheduler is not aware of this
    distinction as the current sched-domain hierarchy has all the threads
    of the core defined at the SMT domain.
    
    	SMT  [Thread siblings of the SMT8 core]
    	DIE  [CPUs in the same die]
    	NUMA [All the CPUs in the system]
    
    Due to this, we can observe run-to-run variance when we run a
    multi-threaded benchmark bound to a single core based on how the
    scheduler spreads the software threads across the two groups in the
    core.
    
    We fix this in this patch by defining each group of threads which
    share L1-cache to be the SMT level. The group of threads in the SMT8
    core is defined to be the CACHE level. The sched-domain hierarchy
    after this patch will be :
    
    	SMT	[Thread siblings in the core that share L1 cache]
    	CACHE 	[Thread siblings that are in the SMT8 core]
    	DIE  	[CPUs in the same die]
    	NUMA 	[All the CPUs in the system]
    Signed-off-by: default avatarGautham R. Shenoy <ego@linux.vnet.ibm.com>
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    8e8a31d7
smp.c 34.3 KB