[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251104072306.100738-2-xieyuanbin1@huawei.com>
Date: Tue, 4 Nov 2025 15:23:05 +0800
From: Xie Yuanbin <xieyuanbin1@...wei.com>
To: <david@...hat.com>, <dave.hansen@...el.com>, <bp@...en8.de>,
<tglx@...utronix.de>, <mingo@...hat.com>, <dave.hansen@...ux.intel.com>,
<hpa@...or.com>, <akpm@...ux-foundation.org>, <lorenzo.stoakes@...cle.com>,
<Liam.Howlett@...cle.com>, <vbabka@...e.cz>, <rppt@...nel.org>,
<surenb@...gle.com>, <mhocko@...e.com>, <linmiaohe@...wei.com>,
<nao.horiguchi@...il.com>, <luto@...nel.org>, <peterz@...radead.org>,
<tony.luck@...el.com>
CC: <x86@...nel.org>, <linux-kernel@...r.kernel.org>, <linux-mm@...ck.org>,
<linux-edac@...r.kernel.org>, <will@...nel.org>, <liaohua4@...wei.com>,
<lilinjie8@...wei.com>, Xie Yuanbin <xieyuanbin1@...wei.com>
Subject: [PATCH v2 1/2] x86/mm: support memory-failure on 32-bits with SPARSEMEM
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 46df8e73a4a3f1445f2a ("mm: free up PG_slab") removes PG_slab
flag that allows MEMORY_FAILURE to be enabled from here on.
The commit 09022bc196d23484a7a5 ("mm: remove PG_error") removes PG_error
flag.
The commit cceba6f7e46c48deca43 ("mm: add PG_dropbehind folio flag") add
PG_dropbehind flag, but MEMORY_FAILURE can still be enabled.
For the current version, for x86_32, when SPARSEMEM && HIGHMEM && X86_PAE
&& X86_PAT, the number of pageflags reaches its maximum value,
which is 31. Therefore, MEMORY_FAILURE can be safely enabled.
Signed-off-by: Xie Yuanbin <xieyuanbin1@...wei.com>
Cc: David Hildenbrand <david@...hat.com>
Cc: Dave Hansen <dave.hansen@...el.com>
---
arch/x86/Kconfig | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index d55c01efd7c2..f9ee57a55500 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -750,13 +750,10 @@ config IOSF_MBI_DEBUG
config X86_SUPPORTS_MEMORY_FAILURE
def_bool y
# MCE code calls memory_failure():
depends on X86_MCE
- # On 32-bit this adds too big of NODES_SHIFT and we run out of page flags:
- # On 32-bit SPARSEMEM adds too big of SECTIONS_WIDTH:
- depends on X86_64 || !SPARSEMEM
select ARCH_SUPPORTS_MEMORY_FAILURE
config X86_32_IRIS
tristate "Eurobraille/Iris poweroff module"
depends on X86_32
--
2.51.0
Powered by blists - more mailing lists