From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755895AbbHQQ36 (ORCPT ); Mon, 17 Aug 2015 12:29:58 -0400 Received: from terminus.zytor.com ([198.137.202.10]:51246 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755748AbbHQQ3y (ORCPT ); Mon, 17 Aug 2015 12:29:54 -0400 Date: Mon, 17 Aug 2015 09:28:48 -0700 From: tip-bot for Len Brown Message-ID: Cc: peterz@infradead.org, hpa@zytor.com, mingo@kernel.org, paulmck@linux.vnet.ibm.com, linux-kernel@vger.kernel.org, boris.ostrovsky@oracle.com, zhugh.fnst@cn.fujitsu.com, jschoenh@amazon.de, tglx@linutronix.de, luto@amacapital.net, arjan@linux.intel.com, imammedo@redhat.com, len.brown@intel.com, dave.hansen@linux.intel.com, bp@alien8.de, torvalds@linux-foundation.org Reply-To: jschoenh@amazon.de, tglx@linutronix.de, luto@amacapital.net, arjan@linux.intel.com, imammedo@redhat.com, len.brown@intel.com, dave.hansen@linux.intel.com, bp@alien8.de, torvalds@linux-foundation.org, peterz@infradead.org, hpa@zytor.com, mingo@kernel.org, paulmck@linux.vnet.ibm.com, linux-kernel@vger.kernel.org, boris.ostrovsky@oracle.com, zhugh.fnst@cn.fujitsu.com In-Reply-To: References: To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/boot] x86/smpboot: Remove SIPI delays from cpu_up() Git-Commit-ID: a9bcaa02a5104ace6a9d9e4a9cd9192a9e7744d6 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: a9bcaa02a5104ace6a9d9e4a9cd9192a9e7744d6 Gitweb: http://git.kernel.org/tip/a9bcaa02a5104ace6a9d9e4a9cd9192a9e7744d6 Author: Len Brown AuthorDate: Sun, 16 Aug 2015 11:45:47 -0400 Committer: Ingo Molnar CommitDate: Mon, 17 Aug 2015 10:42:27 +0200 x86/smpboot: Remove SIPI delays from cpu_up() MPS 1.4 example code shows the following required delays during processor on-lining: INIT udelay(10,000) SIPI udelay(200) SIPI udelay(200) /* Linux actually implements this as udelay(300) */ Linux skips the udelay(10,000) on modern processors. This patch removes the udelay(200) after each SIPI on those same processors. All three legacy delays can be restored by the cmdline "cpu_init_udelay=10000". As measured by analyze_suspend.py, this patch speeds processor resume time on my desktop from 2.4ms to 1.8ms, per AP. 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/a5dfdbc8fbfdd813784da204aad5677fe459ac37.1439739165.git.len.brown@intel.com Signed-off-by: Ingo Molnar --- arch/x86/kernel/smpboot.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 310b6f0..6740264 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c @@ -665,7 +665,8 @@ wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip) /* * Give the other CPU some time to accept the IPI. */ - udelay(300); + if (init_udelay) + udelay(300); pr_debug("Startup point 1\n"); @@ -675,7 +676,8 @@ wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip) /* * Give the other CPU some time to accept the IPI. */ - udelay(200); + if (init_udelay) + udelay(200); if (maxlvt > 3) /* Due to the Pentium erratum 3AP. */ apic_write(APIC_ESR, 0);