Only x86 and Power7 set SD_ASYM_PACKING at boot-time depending on the
system. All other platforms don't make use of asym-packing anyway,
so introduce auxiliary ARCH_HAS_SCHED_ASYM_PACKING and guard all the
related logic behind that so it isn't compiled when not needed.
On arm64 this reduces
size kernel/sched/fair.o
text data bss dec hex filename
74120 4097 88 78305 131e1 kernel/sched/fair.o
to
size kernel/sched/fair.o
text data bss dec hex filename
72896 4065 88 77049 12cf9 kernel/sched/fair.o
Most of that is on the load-balance hot-path, in particular
need_active_balance() reduces from 141 to 84 instructions.
...
hackbench -pTl 20000 on a rk3399 goes from
58.4664 to 57.6056 (-1.5%), mean over 20 iterations.
Signed-off-by: Christian Loehle <christian.loehle@xxxxxxx>
---
arch/Kconfig | 3 ++
arch/powerpc/Kconfig | 1 +
arch/x86/Kconfig | 1 +
kernel/sched/fair.c | 86 ++++++++++++++++++++++++++++++--------------
kernel/sched/sched.h | 8 ++++-
5 files changed, 71 insertions(+), 28 deletions(-)
diff --git a/arch/Kconfig b/arch/Kconfig
index 8af374ea1adc..9f6ec10723a3 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -1684,4 +1684,7 @@ config CC_HAS_SANE_FUNCTION_ALIGNMENT
config ARCH_NEED_CMPXCHG_1_EMU
bool