Skip to content

Commit 2e3ca40

Browse files
Pavel Tatashintorvalds
authored andcommitted
mm: relax deferred struct page requirements
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>
1 parent a85f878 commit 2e3ca40

File tree

4 files changed

+1
-9
lines changed

4 files changed

+1
-9
lines changed

arch/powerpc/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ config PPC
151151
select ARCH_MIGHT_HAVE_PC_PARPORT
152152
select ARCH_MIGHT_HAVE_PC_SERIO
153153
select ARCH_SUPPORTS_ATOMIC_RMW
154-
select ARCH_SUPPORTS_DEFERRED_STRUCT_PAGE_INIT
155154
select ARCH_USE_BUILTIN_BSWAP
156155
select ARCH_USE_CMPXCHG_LOCKREF if PPC64
157156
select ARCH_WANT_IPC_PARSE_VERSION

arch/s390/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ config S390
108108
select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE
109109
select ARCH_SAVE_PAGE_KEYS if HIBERNATION
110110
select ARCH_SUPPORTS_ATOMIC_RMW
111-
select ARCH_SUPPORTS_DEFERRED_STRUCT_PAGE_INIT
112111
select ARCH_SUPPORTS_NUMA_BALANCING
113112
select ARCH_USE_BUILTIN_BSWAP
114113
select ARCH_USE_CMPXCHG_LOCKREF

arch/x86/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ config X86
6969
select ARCH_MIGHT_HAVE_PC_PARPORT
7070
select ARCH_MIGHT_HAVE_PC_SERIO
7171
select ARCH_SUPPORTS_ATOMIC_RMW
72-
select ARCH_SUPPORTS_DEFERRED_STRUCT_PAGE_INIT
7372
select ARCH_SUPPORTS_NUMA_BALANCING if X86_64
7473
select ARCH_USE_BUILTIN_BSWAP
7574
select ARCH_USE_QUEUED_RWLOCKS

mm/Kconfig

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -639,15 +639,10 @@ config MAX_STACK_SIZE_MB
639639

640640
A sane initial value is 80 MB.
641641

642-
# For architectures that support deferred memory initialisation
643-
config ARCH_SUPPORTS_DEFERRED_STRUCT_PAGE_INIT
644-
bool
645-
646642
config DEFERRED_STRUCT_PAGE_INIT
647643
bool "Defer initialisation of struct pages to kthreads"
648644
default n
649-
depends on ARCH_SUPPORTS_DEFERRED_STRUCT_PAGE_INIT
650-
depends on NO_BOOTMEM && MEMORY_HOTPLUG
645+
depends on NO_BOOTMEM
651646
depends on !FLATMEM
652647
help
653648
Ordinarily all struct pages are initialised during early boot in a

0 commit comments

Comments
 (0)