From f04a8fd6a9840ca42669ffbf8bf716dcb981c1a7 Mon Sep 17 00:00:00 2001 From: Nathan Whitehorn Date: Sat, 25 Nov 2017 22:01:55 +0000 Subject: [PATCH] Yield while spinning on APs and avoid announcing all CPUs unless bootverbose is set. These improve startup performance on massively multithreaded systems with 8-way SMT and dozens to hundreds of CPUs. MFC after: 3 weeks --- sys/powerpc/powerpc/mp_machdep.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/powerpc/powerpc/mp_machdep.c b/sys/powerpc/powerpc/mp_machdep.c index f2848be41a1..24e789af80d 100644 --- a/sys/powerpc/powerpc/mp_machdep.c +++ b/sys/powerpc/powerpc/mp_machdep.c @@ -78,7 +78,8 @@ machdep_ap_bootstrap(void) __asm __volatile("msync; isync"); while (ap_letgo == 0) - ; + __asm __volatile("or 27,27,27"); + __asm __volatile("or 6,6,6"); /* Initialize DEC and TB, sync with the BSP values */ platform_smp_timebase_sync(ap_timebase, 1); @@ -177,6 +178,9 @@ cpu_mp_announce(void) struct pcpu *pc; int i; + if (!bootverbose) + return; + CPU_FOREACH(i) { pc = pcpu_find(i); if (pc == NULL) -- 2.45.0