Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1405530 > unrolled thread

[PATCH] mm: make CONFIG_DEFERRED_STRUCT_PAGE_INIT depends on !FLATMEM explicitly

Started byYang Shi <yang.shi@linaro.org>
First post2016-05-23 19:30 +0200
Last post2016-05-23 20:40 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] mm: make CONFIG_DEFERRED_STRUCT_PAGE_INIT depends on !FLATMEM explicitly Yang Shi <yang.shi@linaro.org> - 2016-05-23 19:30 +0200
    Re: [PATCH] mm: make CONFIG_DEFERRED_STRUCT_PAGE_INIT depends on  !FLATMEM explicitly Michal Hocko <mhocko@kernel.org> - 2016-05-23 20:30 +0200
      Re: [PATCH] mm: make CONFIG_DEFERRED_STRUCT_PAGE_INIT depends on  !FLATMEM explicitly "Shi, Yang" <yang.shi@linaro.org> - 2016-05-23 20:40 +0200

#1405530 — [PATCH] mm: make CONFIG_DEFERRED_STRUCT_PAGE_INIT depends on !FLATMEM explicitly

FromYang Shi <yang.shi@linaro.org>
Date2016-05-23 19:30 +0200
Subject[PATCH] mm: make CONFIG_DEFERRED_STRUCT_PAGE_INIT depends on !FLATMEM explicitly
Message-ID<rC1PX-k3-1@gated-at.bofh.it>
Per the suggestion from Michal Hocko [1], CONFIG_DEFERRED_STRUCT_PAGE_INIT
should be incompatible with FLATMEM, make this explicitly in Kconfig.

[1] http://lkml.kernel.org/r/20160523073157.GD2278@dhcp22.suse.cz

Signed-off-by: Yang Shi <yang.shi@linaro.org>
---
 mm/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/Kconfig b/mm/Kconfig
index 2664c11..22fa818 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -649,6 +649,7 @@ config DEFERRED_STRUCT_PAGE_INIT
 	default n
 	depends on ARCH_SUPPORTS_DEFERRED_STRUCT_PAGE_INIT
 	depends on MEMORY_HOTPLUG
+	depends on !FLATMEM
 	help
 	  Ordinarily all struct pages are initialised during early boot in a
 	  single thread. On very large machines this can take a considerable
-- 
2.0.2

[toc] | [next] | [standalone]


#1405561 — Re: [PATCH] mm: make CONFIG_DEFERRED_STRUCT_PAGE_INIT depends on !FLATMEM explicitly

FromMichal Hocko <mhocko@kernel.org>
Date2016-05-23 20:30 +0200
SubjectRe: [PATCH] mm: make CONFIG_DEFERRED_STRUCT_PAGE_INIT depends on !FLATMEM explicitly
Message-ID<rC2M2-WM-15@gated-at.bofh.it>
In reply to#1405530
On Mon 23-05-16 09:54:31, Yang Shi wrote:
> Per the suggestion from Michal Hocko [1], CONFIG_DEFERRED_STRUCT_PAGE_INIT
> should be incompatible with FLATMEM, make this explicitly in Kconfig.

I guess the changelog could benefit from some clarification. What
do you think about the following:

"
DEFERRED_STRUCT_PAGE_INIT requires some ordering wrt other
initialization operations, e.g. page_ext_init has to happen after the
whole memmap is initialized properly. For SPARSEMEM this requires to
wait for page_alloc_init_late. Other memory models (e.g. flatmem) might
have different initialization layouts (page_ext_init_flatmem). Currently
DEFERRED_STRUCT_PAGE_INIT depends on MEMORY_HOTPLUG which in turn
	depends on SPARSEMEM || X86_64_ACPI_NUMA
	depends on ARCH_ENABLE_MEMORY_HOTPLUG

and X86_64_ACPI_NUMA depends on NUMA which in turn disable FLATMEM
memory model:
config ARCH_FLATMEM_ENABLE
	def_bool y
	depends on X86_32 && !NUMA

so FLATMEM is ruled out via dependency maze. Be explicit and disable
FLATMEM for DEFERRED_STRUCT_PAGE_INIT so that we do not reintroduce
subtle initialization bugs
"

> 
> [1] http://lkml.kernel.org/r/20160523073157.GD2278@dhcp22.suse.cz
> 
> Signed-off-by: Yang Shi <yang.shi@linaro.org>
> ---
>  mm/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/mm/Kconfig b/mm/Kconfig
> index 2664c11..22fa818 100644
> --- a/mm/Kconfig
> +++ b/mm/Kconfig
> @@ -649,6 +649,7 @@ config DEFERRED_STRUCT_PAGE_INIT
>  	default n
>  	depends on ARCH_SUPPORTS_DEFERRED_STRUCT_PAGE_INIT
>  	depends on MEMORY_HOTPLUG
> +	depends on !FLATMEM
>  	help
>  	  Ordinarily all struct pages are initialised during early boot in a
>  	  single thread. On very large machines this can take a considerable
> -- 
> 2.0.2

-- 
Michal Hocko
SUSE Labs

[toc] | [prev] | [next] | [standalone]


#1405566 — Re: [PATCH] mm: make CONFIG_DEFERRED_STRUCT_PAGE_INIT depends on !FLATMEM explicitly

From"Shi, Yang" <yang.shi@linaro.org>
Date2016-05-23 20:40 +0200
SubjectRe: [PATCH] mm: make CONFIG_DEFERRED_STRUCT_PAGE_INIT depends on !FLATMEM explicitly
Message-ID<rC2VI-ZT-17@gated-at.bofh.it>
In reply to#1405561
On 5/23/2016 11:22 AM, Michal Hocko wrote:
> On Mon 23-05-16 09:54:31, Yang Shi wrote:
>> Per the suggestion from Michal Hocko [1], CONFIG_DEFERRED_STRUCT_PAGE_INIT
>> should be incompatible with FLATMEM, make this explicitly in Kconfig.
>
> I guess the changelog could benefit from some clarification. What
> do you think about the following:
>
> "
> DEFERRED_STRUCT_PAGE_INIT requires some ordering wrt other
> initialization operations, e.g. page_ext_init has to happen after the
> whole memmap is initialized properly. For SPARSEMEM this requires to
> wait for page_alloc_init_late. Other memory models (e.g. flatmem) might
> have different initialization layouts (page_ext_init_flatmem). Currently
> DEFERRED_STRUCT_PAGE_INIT depends on MEMORY_HOTPLUG which in turn
> 	depends on SPARSEMEM || X86_64_ACPI_NUMA
> 	depends on ARCH_ENABLE_MEMORY_HOTPLUG
>
> and X86_64_ACPI_NUMA depends on NUMA which in turn disable FLATMEM
> memory model:
> config ARCH_FLATMEM_ENABLE
> 	def_bool y
> 	depends on X86_32 && !NUMA
>
> so FLATMEM is ruled out via dependency maze. Be explicit and disable
> FLATMEM for DEFERRED_STRUCT_PAGE_INIT so that we do not reintroduce
> subtle initialization bugs
> "

Thanks a lot. It sounds way better. Will address in V2.

Yang

>
>>
>> [1] http://lkml.kernel.org/r/20160523073157.GD2278@dhcp22.suse.cz
>>
>> Signed-off-by: Yang Shi <yang.shi@linaro.org>
>> ---
>>  mm/Kconfig | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/mm/Kconfig b/mm/Kconfig
>> index 2664c11..22fa818 100644
>> --- a/mm/Kconfig
>> +++ b/mm/Kconfig
>> @@ -649,6 +649,7 @@ config DEFERRED_STRUCT_PAGE_INIT
>>  	default n
>>  	depends on ARCH_SUPPORTS_DEFERRED_STRUCT_PAGE_INIT
>>  	depends on MEMORY_HOTPLUG
>> +	depends on !FLATMEM
>>  	help
>>  	  Ordinarily all struct pages are initialised during early boot in a
>>  	  single thread. On very large machines this can take a considerable
>> --
>> 2.0.2
>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web