mm: relax deferred struct page requirements
authorPavel Tatashin <pasha.tatashin@oracle.com>
Thu, 1 Feb 2018 00:16:02 +0000 (16:16 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 1 Feb 2018 01:18:36 +0000 (17:18 -0800)
There is no need to have ARCH_SUPPORTS_DEFERRED_STRUCT_PAGE_INIT, as all
the page initialization code is in common code.

Also, there is no need to depend on MEMORY_HOTPLUG, as initialization
code does not really use hotplug memory functionality.  So, we can
remove this requirement as well.

This patch allows to use deferred struct page initialization on all
platforms with memblock allocator.

Tested on x86, arm64, and sparc.  Also, verified that code compiles on
PPC with CONFIG_MEMORY_HOTPLUG disabled.

Link: http://lkml.kernel.org/r/20171117014601.31606-1-pasha.tatashin@oracle.com
Signed-off-by: Pavel Tatashin <pasha.tatashin@oracle.com>
Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com> [s390]
Reviewed-by: Khalid Aziz <khalid.aziz@oracle.com>
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Steven Sistare <steven.sistare@oracle.com>
Cc: Daniel Jordan <daniel.m.jordan@oracle.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Reza Arbab <arbab@linux.vnet.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Mel Gorman <mgorman@techsingularity.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/powerpc/Kconfig
arch/s390/Kconfig
arch/x86/Kconfig
mm/Kconfig

index e92432ae97378c3966c95cfdba497c2a50408134..73fcf592ee9143703484b27f7cc65ef702217b4a 100644 (file)
@@ -151,7 +151,6 @@ config PPC
        select ARCH_MIGHT_HAVE_PC_PARPORT
        select ARCH_MIGHT_HAVE_PC_SERIO
        select ARCH_SUPPORTS_ATOMIC_RMW
-       select ARCH_SUPPORTS_DEFERRED_STRUCT_PAGE_INIT
        select ARCH_USE_BUILTIN_BSWAP
        select ARCH_USE_CMPXCHG_LOCKREF         if PPC64
        select ARCH_WANT_IPC_PARSE_VERSION
index 9376637229c94bef154ee5d538665ce76d11bce9..0105ce28e246a766e7348c7a98a733470d3c8a4e 100644 (file)
@@ -108,7 +108,6 @@ config S390
        select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE
        select ARCH_SAVE_PAGE_KEYS if HIBERNATION
        select ARCH_SUPPORTS_ATOMIC_RMW
-       select ARCH_SUPPORTS_DEFERRED_STRUCT_PAGE_INIT
        select ARCH_SUPPORTS_NUMA_BALANCING
        select ARCH_USE_BUILTIN_BSWAP
        select ARCH_USE_CMPXCHG_LOCKREF
index dbe5542a66666bc79c414618a3d5234a1168d8ef..7a1c51198af1798540c7fb5a31f4082337e012e6 100644 (file)
@@ -69,7 +69,6 @@ config X86
        select ARCH_MIGHT_HAVE_PC_PARPORT
        select ARCH_MIGHT_HAVE_PC_SERIO
        select ARCH_SUPPORTS_ATOMIC_RMW
-       select ARCH_SUPPORTS_DEFERRED_STRUCT_PAGE_INIT
        select ARCH_SUPPORTS_NUMA_BALANCING     if X86_64
        select ARCH_USE_BUILTIN_BSWAP
        select ARCH_USE_QUEUED_RWLOCKS
index 03ff7703d3228e66571571a264e3b115d0dd6233..c782e8fb7235ca0932c078beffe02b633c25449a 100644 (file)
@@ -639,15 +639,10 @@ config MAX_STACK_SIZE_MB
 
          A sane initial value is 80 MB.
 
-# For architectures that support deferred memory initialisation
-config ARCH_SUPPORTS_DEFERRED_STRUCT_PAGE_INIT
-       bool
-
 config DEFERRED_STRUCT_PAGE_INIT
        bool "Defer initialisation of struct pages to kthreads"
        default n
-       depends on ARCH_SUPPORTS_DEFERRED_STRUCT_PAGE_INIT
-       depends on NO_BOOTMEM && MEMORY_HOTPLUG
+       depends on NO_BOOTMEM
        depends on !FLATMEM
        help
          Ordinarily all struct pages are initialised during early boot in a