Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753954AbbDMKTR (ORCPT ); Mon, 13 Apr 2015 06:19:17 -0400 Received: from cantor2.suse.de ([195.135.220.15]:56004 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932101AbbDMKRV (ORCPT ); Mon, 13 Apr 2015 06:17:21 -0400 From: Mel Gorman To: Linux-MM Cc: Robin Holt , Nathan Zimmer , Daniel Rahn , Davidlohr Bueso , Dave Hansen , Tom Vaden , Scott Norton , LKML , Mel Gorman Subject: [PATCH 10/14] x86: mm: Enable deferred memory initialisation on x86-64 Date: Mon, 13 Apr 2015 11:17:02 +0100 Message-Id: <1428920226-18147-11-git-send-email-mgorman@suse.de> X-Mailer: git-send-email 2.1.2 In-Reply-To: <1428920226-18147-1-git-send-email-mgorman@suse.de> References: <1428920226-18147-1-git-send-email-mgorman@suse.de> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2164 Lines: 59 This patch adds the Kconfig logic to add deferred memory initialisation to x86-64 if NUMA is enabled. Other architectures should enable on a case-by-case basis once the users of early_pfn_to_nid are audited and it is tested. Signed-off-by: Mel Gorman --- arch/x86/Kconfig | 2 ++ mm/Kconfig | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index b7d31ca55187..830ad8450bbd 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -32,6 +32,8 @@ config X86 select HAVE_UNSTABLE_SCHED_CLOCK select ARCH_SUPPORTS_NUMA_BALANCING if X86_64 select ARCH_SUPPORTS_INT128 if X86_64 + select ARCH_SUPPORTS_DEFERRED_MEM_INIT if X86_64 && NUMA + select ARCH_WANTS_PROT_NUMA_PROT_NONE select HAVE_IDE select HAVE_OPROFILE select HAVE_PCSPKR_PLATFORM diff --git a/mm/Kconfig b/mm/Kconfig index a03131b6ba8e..463c7005c3d9 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -629,3 +629,22 @@ config MAX_STACK_SIZE_MB changed to a smaller value in which case that is used. A sane initial value is 80 MB. + +# For architectures that was to support deferred memory initialisation +config ARCH_SUPPORTS_DEFERRED_MEM_INIT + bool + +config DEFERRED_MEM_INIT + bool "Defer initialisation of memory to kswapd" + default n + depends on ARCH_SUPPORTS_DEFERRED_MEM_INIT + depends on MEMORY_HOTPLUG + help + Ordinarily all struct pages are initialised during early boot in a + single thread. On very large machines this can take a considerable + amount of time. If this option is set, large machines will bring up + a small amount of memory at boot and then initialise the rest when + kswapd starts. Boot times are reduced but very early in the lifetime + of the system it will still be busy initialising struct pages. This + has a potential performance impact on processes until kswapd finishes + the initialisation. -- 2.1.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/