From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755817AbbHQQ3j (ORCPT ); Mon, 17 Aug 2015 12:29:39 -0400 Received: from terminus.zytor.com ([198.137.202.10]:51236 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755704AbbHQQ3h (ORCPT ); Mon, 17 Aug 2015 12:29:37 -0400 Date: Mon, 17 Aug 2015 09:28:24 -0700 From: tip-bot for Len Brown Message-ID: Cc: tglx@linutronix.de, arjan@linux.intel.com, zhugh.fnst@cn.fujitsu.com, jschoenh@amazon.de, luto@amacapital.net, hpa@zytor.com, peterz@infradead.org, bp@alien8.de, mingo@kernel.org, boris.ostrovsky@oracle.com, torvalds@linux-foundation.org, dave.hansen@linux.intel.com, len.brown@intel.com, imammedo@redhat.com, linux-kernel@vger.kernel.org, paulmck@linux.vnet.ibm.com Reply-To: mingo@kernel.org, bp@alien8.de, boris.ostrovsky@oracle.com, linux-kernel@vger.kernel.org, paulmck@linux.vnet.ibm.com, imammedo@redhat.com, torvalds@linux-foundation.org, dave.hansen@linux.intel.com, len.brown@intel.com, jschoenh@amazon.de, zhugh.fnst@cn.fujitsu.com, luto@amacapital.net, tglx@linutronix.de, arjan@linux.intel.com, peterz@infradead.org, hpa@zytor.com In-Reply-To: <0aade12eabeb89a688c929fe80856eaea0544bb7.1439739165.git.len.brown@intel.com> References: <0aade12eabeb89a688c929fe80856eaea0544bb7.1439739165.git.len.brown@intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/boot] x86/smpboot: Remove udelay(100) when polling cpu_callin_map Git-Commit-ID: 2d99af8e8fd6c2dea11ab539f7aba69c37b845b4 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 2d99af8e8fd6c2dea11ab539f7aba69c37b845b4 Gitweb: http://git.kernel.org/tip/2d99af8e8fd6c2dea11ab539f7aba69c37b845b4 Author: Len Brown AuthorDate: Sun, 16 Aug 2015 11:45:46 -0400 Committer: Ingo Molnar CommitDate: Mon, 17 Aug 2015 10:42:27 +0200 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 --- arch/x86/kernel/smpboot.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 9ad88fb..310b6f0 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(); } }