mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
mm: meminit: initialise a subset of struct pages if CONFIG_DEFERRED_STRUCT_PAGE_INIT is set
This patch initalises all low memory struct pages and 2G of the highest zone on each node during memory initialisation if CONFIG_DEFERRED_STRUCT_PAGE_INIT is set. That config option cannot be set but will be available in a later patch. Parallel initialisation of struct page depends on some features from memory hotplug and it is necessary to alter alter section annotations. Signed-off-by: Mel Gorman <[email protected]> Tested-by: Nate Zimmer <[email protected]> Tested-by: Waiman Long <[email protected]> Tested-by: Daniel J Blueman <[email protected]> Acked-by: Pekka Enberg <[email protected]> Cc: Robin Holt <[email protected]> Cc: Nate Zimmer <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Waiman Long <[email protected]> Cc: Scott Norton <[email protected]> Cc: "Luck, Tony" <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Thomas Gleixner <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
75a592a471
commit
3a80a7fa79
5 changed files with 124 additions and 4 deletions
18
mm/Kconfig
18
mm/Kconfig
|
|
@ -636,3 +636,21 @@ 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 support deferred memory initialisation
|
||||
config ARCH_SUPPORTS_DEFERRED_STRUCT_PAGE_INIT
|
||||
bool
|
||||
|
||||
config DEFERRED_STRUCT_PAGE_INIT
|
||||
bool "Defer initialisation of struct pages to kswapd"
|
||||
default n
|
||||
depends on ARCH_SUPPORTS_DEFERRED_STRUCT_PAGE_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 subset of memmap at boot and then initialise the rest in parallel
|
||||
when kswapd starts. This has a potential performance impact on
|
||||
processes running early in the lifetime of the systemm until kswapd
|
||||
finishes the initialisation.
|
||||
|
|
|
|||
Loading…
Reference in a new issue