From: Len Brown Date: Sun, 16 Aug 2015 15:45:46 +0000 (-0400) Subject: x86/smpboot: Remove udelay(100) when polling cpu_callin_map X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2d99af8e8fd6c2dea11ab539f7aba69c37b845b4;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git x86/smpboot: Remove udelay(100) when polling cpu_callin_map After the BSP sends INIT/SIPI/SIP to the AP and sees the AP in the cpu_initialized_map, it sets the AP loose via the cpu_callout_map, and waits for it via the cpu_callin_map. The BSP polls the cpu_callin_map with a udelay(100) and a schedule() in each iteration. The udelay(100) adds no value. For example, on my 4-CPU dekstop, the AP finishes cpu_callin() in under 70 usec and sets the cpu_callin_mask. The BSP, however, doesn't see that setting until over 30 usec later, because it was still running its udelay(100) when the AP finished. Deleting the udelay(100) in the cpu_callin_mask polling loop, saves from 0 to 100 usec per Application Processor. Signed-off-by: Len Brown Cc: Andy Lutomirski Cc: Arjan van de Ven Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Dave Hansen Cc: Igor Mammedov Cc: Jan H. Schönherr Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Zhu Guihua Link: http://lkml.kernel.org/r/0aade12eabeb89a688c929fe80856eaea0544bb7.1439739165.git.len.brown@intel.com Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 9ad88fb0a303..310b6f0bf6f7 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c @@ -926,7 +926,6 @@ static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle) * for the MTRR work(triggered by the AP coming online) * to be completed in the stop machine context. */ - udelay(100); schedule(); } }