Re: [PATCH 1/2] x86/mm: support memory-failure on 32-bits with SPARSEMEM
From: Xie Yuanbin
Date: Mon Nov 03 2025 - 08:28:02 EST
On Mon, 3 Nov 2025 13:08:38 +0100, David Hildenbrand wrote:
>> The historical commit d949f36f1865c60239d4 ("x86: Fix hwpoison code
>> related build failure on 32-bit NUMAQ"), disabled x86_32's
>> memory-failure when SPARSEMEM is enabled, because the number of
>> page-flags are insufficient.
>>
>> The commit 09022bc196d23484a7a5 ("mm: remove PG_error") removes a
>> page flag, so memory-failure can now be enable now.
>
> In the meantime, we added PG_dropbehind
Okay, I completely understand now.
For historical versions, MEMORY_FAILURE cannot be enabled with x86_32 &&
SPARSEMEM because the number of page-flags are insufficient. At least it
has been so from 5.10.x to 6.9.x.
The commit 46df8e73a4a3f1445f2a ("mm: free up PG_slab") from 6.10-rc1
remove a flag that allows MEMORY_FAILURE to be enabled from here on.
The commit 09022bc196d23484a7a5 ("mm: remove PG_error") from 6.12-rc1
remove another flag.
The commit cceba6f7e46c48deca43 ("mm: add PG_dropbehind folio flag") from
6.14-rc1 add a flag, but MEMORY_FAILURE can still be enabled.
At least for the current version, memory-failure can be safely enabled.
The number of pageflags reaches its maximum value under the following
conditions: HIGHMEM && SPARSEMEM && X86_PAE && X86_PAT. In this case, if
MEMORY_FAILURE is enabled, the number of pageflags just reached the limit
of 32.
I will update the V2 patch to describe it.
> Cheers
>
> David / dhildenb
Thanks!
Xie Yuanbin