mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Len Brown <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
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
Subject: [tip:x86/boot] x86/smpboot: Remove udelay(100) when polling cpu_callin_map
Date: Mon, 17 Aug 2015 09:28:24 -0700	[thread overview]
Message-ID: <tip-2d99af8e8fd6c2dea11ab539f7aba69c37b845b4@git.kernel.org> (raw)
In-Reply-To: <0aade12eabeb89a688c929fe80856eaea0544bb7.1439739165.git.len.brown@intel.com>

Commit-ID:  2d99af8e8fd6c2dea11ab539f7aba69c37b845b4
Gitweb:     http://git.kernel.org/tip/2d99af8e8fd6c2dea11ab539f7aba69c37b845b4
Author:     Len Brown <len.brown@intel.com>
AuthorDate: Sun, 16 Aug 2015 11:45:46 -0400
Committer:  Ingo Molnar <mingo@kernel.org>
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 <len.brown@intel.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Jan H. Schönherr <jschoenh@amazon.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Zhu Guihua <zhugh.fnst@cn.fujitsu.com>
Link: http://lkml.kernel.org/r/0aade12eabeb89a688c929fe80856eaea0544bb7.1439739165.git.len.brown@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 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();
 		}
 	}

  reply	other threads:[~2015-08-17 16:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-16 15:45 [PATCH 0/4] x86 smpboot: optimize cpu_up() a bit more Len Brown
2015-08-16 15:45 ` [PATCH 1/4] x86 smpboot: remove udelay(100) when polling cpu_initialized_map Len Brown
2015-08-16 15:45   ` [PATCH 2/4] x86 smpboot: remove udelay(100) when polling cpu_callin_map Len Brown
2015-08-17 16:28     ` tip-bot for Len Brown [this message]
2015-08-16 15:45   ` [PATCH 3/4] x86 smpboot: remove SIPI delays from cpu_up() Len Brown
2015-08-17 16:28     ` [tip:x86/boot] x86/smpboot: Remove " tip-bot for Len Brown
2015-08-16 15:45   ` [PATCH 4/4] x86 smpboot: remove APIC.wait_for_init_deassert and atomic init_deasserted Len Brown
2015-08-17 16:29     ` [tip:x86/boot] x86/smpboot: Remove " tip-bot for Len Brown
2015-08-17 16:28   ` [tip:x86/boot] x86/smpboot: Remove udelay(100) when polling cpu_initialized_map tip-bot for Len Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-2d99af8e8fd6c2dea11ab539f7aba69c37b845b4@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=arjan@linux.intel.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=imammedo@redhat.com \
    --cc=jschoenh@amazon.de \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=mingo@kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=zhugh.fnst@cn.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome