From: tip-bot for Len Brown <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: torvalds@linux-foundation.org, luto@amacapital.net,
mingo@kernel.org, boris.ostrovsky@oracle.com,
zhugh.fnst@cn.fujitsu.com, peterz@infradead.org,
imammedo@redhat.com, bp@alien8.de, paulmck@linux.vnet.ibm.com,
jschoenh@amazon.de, tglx@linutronix.de, len.brown@intel.com,
arjan@linux.intel.com, linux-kernel@vger.kernel.org,
dave.hansen@linux.intel.com, hpa@zytor.com
Subject: [tip:x86/boot] x86/smpboot: Remove udelay(100) when polling cpu_initialized_map
Date: Mon, 17 Aug 2015 09:28:02 -0700 [thread overview]
Message-ID: <tip-6e38f1e79d16f4fa9e5cf06792500e11c96a6f84@git.kernel.org> (raw)
In-Reply-To: <33ef746c67d2489cad0a9b1958cf71167232ff2b.1439739165.git.len.brown@intel.com>
Commit-ID: 6e38f1e79d16f4fa9e5cf06792500e11c96a6f84
Gitweb: http://git.kernel.org/tip/6e38f1e79d16f4fa9e5cf06792500e11c96a6f84
Author: Len Brown <len.brown@intel.com>
AuthorDate: Sun, 16 Aug 2015 11:45:45 -0400
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 17 Aug 2015 10:42:27 +0200
x86/smpboot: Remove udelay(100) when polling cpu_initialized_map
After the BSP sends the APIC INIT/SIPI/SIPI to the AP,
it waits for the AP to come up and indicate that it is alive
by setting its own bit in the cpu_initialized_mask.
Linux polls for up to 10 seconds for this to happen.
Each polling loop has a udelay(100) and a call to schedule().
The udelay(100) adds no value.
For example, on my desktop, the BSP waits for the
other 3 CPUs to come on line at boot for 305, 404, 405 usec.
For resume from S3, it waits 317, 404, 405 usec.
But when the udelay(100) is removed, the BSP waits
305, 310, 306 for boot, and 305, 307, 306 for resume.
So for both boot and resume, removing the udelay(100)
speeds online by about 100us in 2 of 3 cases.
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/33ef746c67d2489cad0a9b1958cf71167232ff2b.1439739165.git.len.brown@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/kernel/smpboot.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index b1f3ed9c..9ad88fb 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -898,7 +898,7 @@ static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle)
if (!boot_error) {
/*
- * Wait 10s total for a response from AP
+ * Wait 10s total for first sign of life from AP
*/
boot_error = -1;
timeout = jiffies + 10*HZ;
@@ -911,7 +911,6 @@ static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle)
boot_error = 0;
break;
}
- udelay(100);
schedule();
}
}
prev parent 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:x86/boot] x86/smpboot: Remove " tip-bot for Len Brown
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-bot for Len Brown [this message]
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-6e38f1e79d16f4fa9e5cf06792500e11c96a6f84@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