All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm, page_alloc: really disable DEBUG_PAGEALLOC with hibernation
@ 2021-05-19 15:28 Krzysztof Kozlowski
  2021-05-19 15:30 ` David Hildenbrand
  2021-05-19 15:38 ` Vlastimil Babka
  0 siblings, 2 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2021-05-19 15:28 UTC (permalink / raw)
  To: Andrew Morton, Akinobu Mita, linux-mm, linux-kernel
  Cc: Vlastimil Babka, David Hildenbrand, Michal Hocko,
	Rafael J . Wysocki, Andrea Righi, Guilherme Piccoli,
	Krzysztof Kozlowski

The documentation of DEBUG_PAGEALLOC states that it cannot be used with
hibernation, however the Kconfig entry would allow it if
ARCH_SUPPORTS_DEBUG_PAGEALLOC && !PPC && !SPARC.

Fixes: ee3b4290aec0 ("generic debug pagealloc: build fix")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
---
 mm/Kconfig.debug | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/Kconfig.debug b/mm/Kconfig.debug
index 1e73717802f8..0ace5b2a9d04 100644
--- a/mm/Kconfig.debug
+++ b/mm/Kconfig.debug
@@ -11,7 +11,7 @@ config PAGE_EXTENSION
 config DEBUG_PAGEALLOC
 	bool "Debug page memory allocations"
 	depends on DEBUG_KERNEL
-	depends on !HIBERNATION || ARCH_SUPPORTS_DEBUG_PAGEALLOC && !PPC && !SPARC
+	depends on !HIBERNATION && ARCH_SUPPORTS_DEBUG_PAGEALLOC && !PPC && !SPARC
 	select PAGE_POISONING if !ARCH_SUPPORTS_DEBUG_PAGEALLOC
 	help
 	  Unmap pages from the kernel linear mapping after free_pages().
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] mm, page_alloc: really disable DEBUG_PAGEALLOC with hibernation
  2021-05-19 15:28 [PATCH] mm, page_alloc: really disable DEBUG_PAGEALLOC with hibernation Krzysztof Kozlowski
@ 2021-05-19 15:30 ` David Hildenbrand
  2021-05-19 15:42   ` Krzysztof Kozlowski
  2021-05-19 15:48   ` Vlastimil Babka
  2021-05-19 15:38 ` Vlastimil Babka
  1 sibling, 2 replies; 7+ messages in thread
From: David Hildenbrand @ 2021-05-19 15:30 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Andrew Morton, Akinobu Mita, linux-mm, linux-kernel
  Cc: Vlastimil Babka, Michal Hocko, Rafael J . Wysocki, Andrea Righi,
	Guilherme Piccoli

On 19.05.21 17:28, Krzysztof Kozlowski wrote:
> The documentation of DEBUG_PAGEALLOC states that it cannot be used with
> hibernation, however the Kconfig entry would allow it if
> ARCH_SUPPORTS_DEBUG_PAGEALLOC && !PPC && !SPARC.
> 
> Fixes: ee3b4290aec0 ("generic debug pagealloc: build fix")
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
> ---
>   mm/Kconfig.debug | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/Kconfig.debug b/mm/Kconfig.debug
> index 1e73717802f8..0ace5b2a9d04 100644
> --- a/mm/Kconfig.debug
> +++ b/mm/Kconfig.debug
> @@ -11,7 +11,7 @@ config PAGE_EXTENSION
>   config DEBUG_PAGEALLOC
>   	bool "Debug page memory allocations"
>   	depends on DEBUG_KERNEL
> -	depends on !HIBERNATION || ARCH_SUPPORTS_DEBUG_PAGEALLOC && !PPC && !SPARC
> +	depends on !HIBERNATION && ARCH_SUPPORTS_DEBUG_PAGEALLOC && !PPC && !SPARC
>   	select PAGE_POISONING if !ARCH_SUPPORTS_DEBUG_PAGEALLOC
>   	help
>   	  Unmap pages from the kernel linear mapping after free_pages().
> 

I remember this should be working now, as we temporarily map the pages 
in the direct map when hibernating?

-- 
Thanks,

David / dhildenb


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] mm, page_alloc: really disable DEBUG_PAGEALLOC with hibernation
  2021-05-19 15:28 [PATCH] mm, page_alloc: really disable DEBUG_PAGEALLOC with hibernation Krzysztof Kozlowski
  2021-05-19 15:30 ` David Hildenbrand
@ 2021-05-19 15:38 ` Vlastimil Babka
  2021-05-19 15:43   ` Krzysztof Kozlowski
  1 sibling, 1 reply; 7+ messages in thread
From: Vlastimil Babka @ 2021-05-19 15:38 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Andrew Morton, Akinobu Mita, linux-mm, linux-kernel
  Cc: David Hildenbrand, Michal Hocko, Rafael J . Wysocki,
	Andrea Righi, Guilherme Piccoli

On 5/19/21 5:28 PM, Krzysztof Kozlowski wrote:
> The documentation of DEBUG_PAGEALLOC states that it cannot be used with
> hibernation, however the Kconfig entry would allow it if
> ARCH_SUPPORTS_DEBUG_PAGEALLOC && !PPC && !SPARC.
> 
> Fixes: ee3b4290aec0 ("generic debug pagealloc: build fix")
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>

Hmm the documentation seems wrong, as going through history it was indeed in
conflict only on PPC and SPARC.

> ---
>  mm/Kconfig.debug | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/Kconfig.debug b/mm/Kconfig.debug
> index 1e73717802f8..0ace5b2a9d04 100644
> --- a/mm/Kconfig.debug
> +++ b/mm/Kconfig.debug
> @@ -11,7 +11,7 @@ config PAGE_EXTENSION
>  config DEBUG_PAGEALLOC
>  	bool "Debug page memory allocations"
>  	depends on DEBUG_KERNEL
> -	depends on !HIBERNATION || ARCH_SUPPORTS_DEBUG_PAGEALLOC && !PPC && !SPARC
> +	depends on !HIBERNATION && ARCH_SUPPORTS_DEBUG_PAGEALLOC && !PPC && !SPARC
>  	select PAGE_POISONING if !ARCH_SUPPORTS_DEBUG_PAGEALLOC
>  	help
>  	  Unmap pages from the kernel linear mapping after free_pages().
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] mm, page_alloc: really disable DEBUG_PAGEALLOC with hibernation
  2021-05-19 15:30 ` David Hildenbrand
@ 2021-05-19 15:42   ` Krzysztof Kozlowski
  2021-05-19 15:48   ` Vlastimil Babka
  1 sibling, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2021-05-19 15:42 UTC (permalink / raw)
  To: David Hildenbrand, Andrew Morton, Akinobu Mita, linux-mm, linux-kernel
  Cc: Vlastimil Babka, Michal Hocko, Rafael J . Wysocki, Andrea Righi,
	Guilherme Piccoli

On 19/05/2021 11:30, David Hildenbrand wrote:
> On 19.05.21 17:28, Krzysztof Kozlowski wrote:
>> The documentation of DEBUG_PAGEALLOC states that it cannot be used with
>> hibernation, however the Kconfig entry would allow it if
>> ARCH_SUPPORTS_DEBUG_PAGEALLOC && !PPC && !SPARC.
>>
>> Fixes: ee3b4290aec0 ("generic debug pagealloc: build fix")
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
>> ---
>>   mm/Kconfig.debug | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/mm/Kconfig.debug b/mm/Kconfig.debug
>> index 1e73717802f8..0ace5b2a9d04 100644
>> --- a/mm/Kconfig.debug
>> +++ b/mm/Kconfig.debug
>> @@ -11,7 +11,7 @@ config PAGE_EXTENSION
>>   config DEBUG_PAGEALLOC
>>   	bool "Debug page memory allocations"
>>   	depends on DEBUG_KERNEL
>> -	depends on !HIBERNATION || ARCH_SUPPORTS_DEBUG_PAGEALLOC && !PPC && !SPARC
>> +	depends on !HIBERNATION && ARCH_SUPPORTS_DEBUG_PAGEALLOC && !PPC && !SPARC
>>   	select PAGE_POISONING if !ARCH_SUPPORTS_DEBUG_PAGEALLOC
>>   	help
>>   	  Unmap pages from the kernel linear mapping after free_pages().
>>
> 
> I remember this should be working now, as we temporarily map the pages 
> in the direct map when hibernating?

Let me actually test it on x86_64...


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] mm, page_alloc: really disable DEBUG_PAGEALLOC with hibernation
  2021-05-19 15:38 ` Vlastimil Babka
@ 2021-05-19 15:43   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2021-05-19 15:43 UTC (permalink / raw)
  To: Vlastimil Babka, Andrew Morton, Akinobu Mita, linux-mm, linux-kernel
  Cc: David Hildenbrand, Michal Hocko, Rafael J . Wysocki,
	Andrea Righi, Guilherme Piccoli

On 19/05/2021 11:38, Vlastimil Babka wrote:
> On 5/19/21 5:28 PM, Krzysztof Kozlowski wrote:
>> The documentation of DEBUG_PAGEALLOC states that it cannot be used with
>> hibernation, however the Kconfig entry would allow it if
>> ARCH_SUPPORTS_DEBUG_PAGEALLOC && !PPC && !SPARC.
>>
>> Fixes: ee3b4290aec0 ("generic debug pagealloc: build fix")
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
> 
> Hmm the documentation seems wrong, as going through history it was indeed in
> conflict only on PPC and SPARC.

Indeed, x86 was never marked as a problem, although text/info warning
does not mention specific architectures.
> 


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] mm, page_alloc: really disable DEBUG_PAGEALLOC with hibernation
  2021-05-19 15:30 ` David Hildenbrand
  2021-05-19 15:42   ` Krzysztof Kozlowski
@ 2021-05-19 15:48   ` Vlastimil Babka
  2021-05-19 17:57     ` Krzysztof Kozlowski
  1 sibling, 1 reply; 7+ messages in thread
From: Vlastimil Babka @ 2021-05-19 15:48 UTC (permalink / raw)
  To: David Hildenbrand, Krzysztof Kozlowski, Andrew Morton,
	Akinobu Mita, linux-mm, linux-kernel
  Cc: Michal Hocko, Rafael J . Wysocki, Andrea Righi, Guilherme Piccoli

On 5/19/21 5:30 PM, David Hildenbrand wrote:
> On 19.05.21 17:28, Krzysztof Kozlowski wrote:
>> The documentation of DEBUG_PAGEALLOC states that it cannot be used with
>> hibernation, however the Kconfig entry would allow it if
>> ARCH_SUPPORTS_DEBUG_PAGEALLOC && !PPC && !SPARC.
>>
>> Fixes: ee3b4290aec0 ("generic debug pagealloc: build fix")
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
>> ---
>>   mm/Kconfig.debug | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/mm/Kconfig.debug b/mm/Kconfig.debug
>> index 1e73717802f8..0ace5b2a9d04 100644
>> --- a/mm/Kconfig.debug
>> +++ b/mm/Kconfig.debug
>> @@ -11,7 +11,7 @@ config PAGE_EXTENSION
>>   config DEBUG_PAGEALLOC
>>       bool "Debug page memory allocations"
>>       depends on DEBUG_KERNEL
>> -    depends on !HIBERNATION || ARCH_SUPPORTS_DEBUG_PAGEALLOC && !PPC && !SPARC
>> +    depends on !HIBERNATION && ARCH_SUPPORTS_DEBUG_PAGEALLOC && !PPC && !SPARC
>>       select PAGE_POISONING if !ARCH_SUPPORTS_DEBUG_PAGEALLOC
>>       help
>>         Unmap pages from the kernel linear mapping after free_pages().
>>
> 
> I remember this should be working now, as we temporarily map the pages in the
> direct map when hibernating?

Yeah, and if the problem was the page poisoning based implementation/fallback,
that was also fixed.

The current dependencies come from the unification by ee3b4290aec03

The question is if PPC and SPARC still really need to disable hibernation.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] mm, page_alloc: really disable DEBUG_PAGEALLOC with hibernation
  2021-05-19 15:48   ` Vlastimil Babka
@ 2021-05-19 17:57     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2021-05-19 17:57 UTC (permalink / raw)
  To: Vlastimil Babka, David Hildenbrand, Andrew Morton, Akinobu Mita,
	linux-mm, linux-kernel
  Cc: Michal Hocko, Rafael J . Wysocki, Andrea Righi, Guilherme Piccoli

On 19/05/2021 11:48, Vlastimil Babka wrote:
> On 5/19/21 5:30 PM, David Hildenbrand wrote:
>> On 19.05.21 17:28, Krzysztof Kozlowski wrote:
>>> The documentation of DEBUG_PAGEALLOC states that it cannot be used with
>>> hibernation, however the Kconfig entry would allow it if
>>> ARCH_SUPPORTS_DEBUG_PAGEALLOC && !PPC && !SPARC.
>>>
>>> Fixes: ee3b4290aec0 ("generic debug pagealloc: build fix")
>>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
>>> ---
>>>   mm/Kconfig.debug | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/mm/Kconfig.debug b/mm/Kconfig.debug
>>> index 1e73717802f8..0ace5b2a9d04 100644
>>> --- a/mm/Kconfig.debug
>>> +++ b/mm/Kconfig.debug
>>> @@ -11,7 +11,7 @@ config PAGE_EXTENSION
>>>   config DEBUG_PAGEALLOC
>>>       bool "Debug page memory allocations"
>>>       depends on DEBUG_KERNEL
>>> -    depends on !HIBERNATION || ARCH_SUPPORTS_DEBUG_PAGEALLOC && !PPC && !SPARC
>>> +    depends on !HIBERNATION && ARCH_SUPPORTS_DEBUG_PAGEALLOC && !PPC && !SPARC
>>>       select PAGE_POISONING if !ARCH_SUPPORTS_DEBUG_PAGEALLOC
>>>       help
>>>         Unmap pages from the kernel linear mapping after free_pages().
>>>
>>
>> I remember this should be working now, as we temporarily map the pages in the
>> direct map when hibernating?
> 
> Yeah, and if the problem was the page poisoning based implementation/fallback,
> that was also fixed.
> 
> The current dependencies come from the unification by ee3b4290aec03
> 
> The question is if PPC and SPARC still really need to disable hibernation.

I tested slightly older kernel (v5.8 with few backports for poison
support with hibernation) and it worked fine on x86_64. For the PPC and
SPARC I don't know.

I can update the Kconfig option description to mention x86_64.


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-05-19 17:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-19 15:28 [PATCH] mm, page_alloc: really disable DEBUG_PAGEALLOC with hibernation Krzysztof Kozlowski
2021-05-19 15:30 ` David Hildenbrand
2021-05-19 15:42   ` Krzysztof Kozlowski
2021-05-19 15:48   ` Vlastimil Babka
2021-05-19 17:57     ` Krzysztof Kozlowski
2021-05-19 15:38 ` Vlastimil Babka
2021-05-19 15:43   ` Krzysztof Kozlowski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.