linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 0/2] Delay initializing of large sections of memory
@ 2013-06-21 16:25 Nathan Zimmer
  2013-06-21 16:25 ` [RFC 1/2] x86_64, mm: Delay initializing large portion " Nathan Zimmer
                   ` (3 more replies)
  0 siblings, 4 replies; 70+ messages in thread
From: Nathan Zimmer @ 2013-06-21 16:25 UTC (permalink / raw)
  Cc: holt, travis, nzimmer, rob, tglx, mingo, hpa, yinghai, akpm,
	gregkh, x86, linux-doc, linux-kernel

This rfc patch set delays initializing large sections of memory until we have
started cpus.  This has the effect of reducing startup times on large memory
systems.  On 16TB it can take over an hour to boot and most of that time
is spent initializing memory.

We avoid that bottleneck by delaying initialization until after we have 
started multiple cpus and can initialize in a multithreaded manner.
This allows us to actually reduce boot time rather then just moving around
the point of initialization.

Mike and I have worked on this set for a while, with him doing the most of the
heavy lifting, and are eager for some feedback.

Mike Travis (2):
  x86_64, mm: Delay initializing large portion of memory
  x86_64, mm: Reinsert the absent memory

 Documentation/kernel-parameters.txt |  15 ++
 arch/x86/Kconfig                    |  10 ++
 arch/x86/include/asm/e820.h         |  16 +-
 arch/x86/kernel/e820.c              | 292 +++++++++++++++++++++++++++++++++++-
 drivers/base/memory.c               |  83 ++++++++++
 include/linux/memory.h              |   5 +
 6 files changed, 413 insertions(+), 8 deletions(-)

-- 
1.8.2.1


^ permalink raw reply	[flat|nested] 70+ messages in thread
* Re: [RFC] Transparent on-demand memory setup initialization embedded in the (GFP) buddy allocator
@ 2013-06-27  3:35 Daniel J Blueman
  2013-06-28 20:37 ` Nathan Zimmer
  0 siblings, 1 reply; 70+ messages in thread
From: Daniel J Blueman @ 2013-06-27  3:35 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Mike Travis, H. Peter Anvin, Nathan Zimmer, holt, rob,
	Thomas Gleixner, Ingo Molnar, yinghai, Greg KH, x86, linux-doc,
	Linux Kernel, Linus Torvalds, Peter Zijlstra, Steffen Persvold

On Wednesday, June 26, 2013 9:30:02 PM UTC+8, Andrew Morton wrote:
 >
 > On Wed, 26 Jun 2013 11:22:48 +0200 Ingo Molnar <mi...@kernel.org> wrote:
 >
 > > except that on 32 TB
 > > systems we don't spend ~2 hours initializing 8,589,934,592 page heads.
 >
 > That's about a million a second which is crazy slow - even my 
prehistoric desktop
 > is 100x faster than that.
 >
 > Where's all this time actually being spent?

The complexity of a directory-lookup architecture to make the 
(intrinsically unscalable) cache-coherency protocol scalable gives you a 
~1us roundtrip to remote NUMA nodes.

Probably a lot of time is spent in some memsets, and RMW cycles which 
are setting page bits, which are intrinsically synchronous, so the 
initialising core can't get to 12 or so outstanding memory transactions.

Since EFI memory ranges have a flag to state if they are zerod (which 
may be a fair assumption for memory on non-bootstrap processor NUMA 
nodes), we can probably collapse the RMWs to just writes.

A normal write will require a coherency cycle, then a fetch and a 
writeback when it's evicted from the cache. For this purpose, 
non-temporal writes would eliminate the cache line fetch and give a 
massive increase in bandwidth. We wouldn't even need a store-fence as 
the initialising core is the only one online.

Daniel
-- 
Daniel J Blueman
Principal Software Engineer, Numascale Asia

^ permalink raw reply	[flat|nested] 70+ messages in thread

end of thread, other threads:[~2013-06-29 18:03 UTC | newest]

Thread overview: 70+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-21 16:25 [RFC 0/2] Delay initializing of large sections of memory Nathan Zimmer
2013-06-21 16:25 ` [RFC 1/2] x86_64, mm: Delay initializing large portion " Nathan Zimmer
2013-06-25  4:14   ` Rob Landley
2013-06-21 16:25 ` [RFC 2/2] x86_64, mm: Reinsert the absent memory Nathan Zimmer
2013-06-23  9:28   ` Ingo Molnar
2013-06-23  9:32     ` Ingo Molnar
2013-06-24 17:38       ` H. Peter Anvin
2013-06-24 19:39         ` Ingo Molnar
2013-06-24 20:08           ` H. Peter Anvin
2013-06-25  7:31             ` Ingo Molnar
2013-06-24 20:36     ` Nathan Zimmer
2013-06-25  7:38       ` Ingo Molnar
2013-06-25 15:07         ` H. Peter Anvin
2013-06-25 17:19           ` Mike Travis
2013-06-25 17:22         ` Mike Travis
2013-06-25 18:43           ` H. Peter Anvin
2013-06-25 18:51             ` Mike Travis
2013-06-26  9:22               ` [RFC] Transparent on-demand memory setup initialization embedded in the (GFP) buddy allocator Ingo Molnar
2013-06-26 13:28                 ` Andrew Morton
2013-06-26 13:37                   ` Ingo Molnar
2013-06-26 15:02                     ` Nathan Zimmer
2013-06-26 16:15                     ` Mike Travis
2013-06-26 12:14       ` [RFC 2/2] x86_64, mm: Reinsert the absent memory Ingo Molnar
2013-06-26 14:49         ` Nathan Zimmer
2013-06-26 15:12           ` Dave Hansen
2013-06-26 15:20             ` Nathan Zimmer
2013-06-26 15:58               ` Ingo Molnar
2013-06-26 16:11                 ` Nathan Zimmer
2013-06-26 16:07         ` Mike Travis
2013-06-21 16:51 ` [RFC 0/2] Delay initializing of large sections of memory Greg KH
2013-06-21 17:03   ` H. Peter Anvin
2013-06-21 17:18     ` Nathan Zimmer
2013-06-21 17:28       ` H. Peter Anvin
2013-06-21 20:05         ` Nathan Zimmer
2013-06-21 20:08           ` H. Peter Anvin
2013-06-21 20:33             ` Nathan Zimmer
2013-06-21 21:36             ` Mike Travis
2013-06-21 21:07       ` Mike Travis
2013-06-21 18:44     ` Yinghai Lu
2013-06-21 18:50       ` Greg KH
2013-06-21 19:10         ` Yinghai Lu
2013-06-21 19:19           ` Nathan Zimmer
2013-06-21 20:28             ` Yinghai Lu
2013-06-21 20:40               ` Nathan Zimmer
2013-06-21 21:30         ` Mike Travis
2013-06-22  0:23           ` Yinghai Lu
2013-06-25 17:35             ` Mike Travis
2013-06-25 18:17               ` H. Peter Anvin
2013-06-25 18:40                 ` Mike Travis
2013-06-25 18:40                 ` Yinghai Lu
2013-06-25 18:44                   ` H. Peter Anvin
2013-06-25 18:58                     ` Mike Travis
2013-06-25 19:03                       ` Yinghai Lu
2013-06-25 19:09                         ` H. Peter Anvin
2013-06-25 19:28                           ` Yinghai Lu
2013-06-27  6:37                       ` Yinghai Lu
2013-06-27 11:05                         ` Robin Holt
2013-06-27 15:50                         ` Mike Travis
2013-06-26  9:23                   ` Ingo Molnar
2013-06-25 18:38               ` Yinghai Lu
2013-06-25 18:42                 ` Mike Travis
2013-06-21 18:36 ` Yinghai Lu
2013-06-21 18:44   ` Greg Kroah-Hartman
2013-06-21 19:00     ` Yinghai Lu
2013-06-21 21:28       ` Mike Travis
2013-06-21 21:19   ` Mike Travis
2013-06-27  3:35 [RFC] Transparent on-demand memory setup initialization embedded in the (GFP) buddy allocator Daniel J Blueman
2013-06-28 20:37 ` Nathan Zimmer
2013-06-29  7:24   ` Ingo Molnar
2013-06-29 18:03     ` Nathan Zimmer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).