]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/smp: Optimize update_coregroup_mask
authorSrikar Dronamraju <srikar@linux.vnet.ibm.com>
Mon, 21 Sep 2020 09:56:53 +0000 (15:26 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 6 Oct 2020 12:22:27 +0000 (23:22 +1100)
commit8a4f7314ad3ad4ac00530da0e6c48f3f5c0d94e1
tree9e3fcc9ac2ccf110d15c2c6da54c0e0c4d8c57c1
parent98ea1f53494029a6b07da14e77c6a004795ecc8e
powerpc/smp: Optimize update_coregroup_mask

All threads of a SMT4/SMT8 core can either be part of CPU's coregroup
mask or outside the coregroup. Use this relation to reduce the
number of iterations needed to find all the CPUs that share the same
coregroup

Use a temporary mask to iterate through the CPUs that may share
coregroup mask. Also instead of setting one CPU at a time into
cpu_coregroup_mask, copy the SMT4/SMT8/submask at one shot.

Signed-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200921095653.9701-12-srikar@linux.vnet.ibm.com
arch/powerpc/kernel/smp.c