linux/arch
Ricardo Neri a1176e1a95 x86/sched: Decrease further the priorities of SMT siblings
Mainline: 183b8ec38f
From: v5.16-rc1
Category: Bugfix
CVE: NA

When scheduling, it is better to prefer a separate physical core rather
than the SMT sibling of a high priority core. The existing formula to
compute priorities takes such fact in consideration. There may exist,
however, combinations of priorities (i.e., maximum frequencies) in which
the priority of high-numbered SMT siblings of high-priority cores collides
with the priority of low-numbered SMT siblings of low-priority cores.

Consider for instance an SMT2 system with CPUs [0, 1] with priority 60 and
[2, 3] with priority 30(CPUs in brackets are SMT siblings. In such a case,
the resulting priorities would be [120, 60], [60, 30]. Thus, to ensure
that CPU2 has higher priority than CPU1, divide the raw priority by the
squared SMT iterator. The resulting priorities are [120, 30]. [60, 15].

Originally-by: Len Brown <len.brown@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20210911011819.12184-2-ricardo.neri-calderon@linux.intel.com
Signed-off-by: chen zhang <chenzhang@kylinos.cn>
Change-Id: I9e570a403ad0a2e189ae8f01f0f78c02dfb6118e
Reviewed-on: http://gerrit.kylin.com/c/kfocal/+/33254
2022-06-22 22:03:44 +08:00
..
alpha alpha: enable GENERIC_PCI_IOMAP unconditionally 2021-09-19 10:37:00 -07:00
arc signal: Replace force_sigsegv(SIGSEGV) with force_fatal_sig(SIGSEGV) 2021-11-25 09:49:06 +01:00
arm ARM: 9170/1: fix panic when kasan and kprobe are enabled 2022-02-01 17:27:07 +01:00
arm64 arm64: Add Cortex-A510 CPU part definition 2022-02-11 09:10:26 +01:00
csky perf: Protect perf_guest_cbs with RCU 2022-01-20 09:13:14 +01:00
h8300 Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
hexagon hexagon: clean up timer-regs.h 2021-11-25 09:48:42 +01:00
ia64 PCI/sysfs: Find shadow ROM before static attribute initialization 2022-02-01 17:27:05 +01:00
m68k signal: Replace force_fatal_sig with force_exit_sig when in doubt 2021-11-25 09:49:07 +01:00
microblaze Microblaze patches for 5.15-rc1 2021-09-08 16:02:13 -07:00
mips PCI/sysfs: Find shadow ROM before static attribute initialization 2022-02-01 17:27:05 +01:00
nds32 perf: Protect perf_guest_cbs with RCU 2022-01-20 09:13:14 +01:00
nios2 nios2: Make NIOS2_DTB_SOURCE_BOOL depend on !COMPILE_TEST 2021-10-27 09:29:07 -05:00
openrisc openrisc: Add clone3 ABI wrapper 2022-01-27 11:04:10 +01:00
parisc parisc: Fix lpa and lpa_user defines 2022-01-27 11:05:12 +01:00
powerpc powerpc/perf: Fix power_pmu_disable to call clear_pmi_irq_pending only if PMI is pending 2022-02-01 17:27:12 +01:00
riscv riscv: dts: microchip: mpfs: Drop empty chosen node 2022-01-27 11:05:28 +01:00
s390 KVM: s390: Return error on SIDA memop on normal guest 2022-02-11 09:10:26 +01:00
sh Documentation, arch: Remove leftovers from CIFS_WEAK_PW_HASH 2022-01-27 11:05:21 +01:00
sparc signal: Replace force_fatal_sig with force_exit_sig when in doubt 2021-11-25 09:49:07 +01:00
um um: gitignore: Add kernel/capflags.c 2022-01-27 11:05:34 +01:00
x86 x86/sched: Decrease further the priorities of SMT siblings 2022-06-22 22:03:44 +08:00
xtensa xtensa: xtfpga: Try software restart before simulating CPU reset 2021-10-05 12:19:05 -07:00
.gitignore
Kconfig arch/cc: Introduce a function to check for confidential computing features 2021-11-18 19:17:21 +01:00