From: Xie Yuanbin <xieyuanbin1@huawei.com>
To: <david@redhat.com>, <dave.hansen@intel.com>, <bp@alien8.de>,
<tglx@linutronix.de>, <mingo@redhat.com>,
<dave.hansen@linux.intel.com>, <hpa@zytor.com>,
<akpm@linux-foundation.org>, <lorenzo.stoakes@oracle.com>,
<Liam.Howlett@oracle.com>, <vbabka@suse.cz>, <rppt@kernel.org>,
<surenb@google.com>, <mhocko@suse.com>, <linmiaohe@huawei.com>,
<nao.horiguchi@gmail.com>, <luto@kernel.org>,
<peterz@infradead.org>, <tony.luck@intel.com>
Cc: <x86@kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-mm@kvack.org>, <linux-edac@vger.kernel.org>,
<will@kernel.org>, <liaohua4@huawei.com>, <lilinjie8@huawei.com>,
Xie Yuanbin <xieyuanbin1@huawei.com>
Subject: [PATCH v2 1/2] x86/mm: support memory-failure on 32-bits with SPARSEMEM
Date: Tue, 4 Nov 2025 15:23:05 +0800 [thread overview]
Message-ID: <20251104072306.100738-2-xieyuanbin1@huawei.com> (raw)
In-Reply-To: <20251104072306.100738-1-xieyuanbin1@huawei.com>
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@huawei.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Dave Hansen <dave.hansen@intel.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
next prev parent reply other threads:[~2025-11-04 7:23 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-04 7:23 [PATCH v2 0/2] " Xie Yuanbin
2025-11-04 7:23 ` Xie Yuanbin [this message]
2025-11-04 7:23 ` [PATCH v2 2/2] mm/memory-failure: remove the selection of RAS Xie Yuanbin
2025-11-04 9:38 ` David Hildenbrand (Red Hat)
2025-11-04 9:50 ` Xie Yuanbin
2025-11-04 9:33 ` [PATCH v2 0/2] x86/mm: support memory-failure on 32-bits with SPARSEMEM David Hildenbrand (Red Hat)
2025-11-04 13:29 ` Xie Yuanbin
2025-11-04 13:32 ` Xie Yuanbin
2025-11-04 14:26 ` Dave Hansen
2025-11-05 2:45 ` Xie Yuanbin
2025-11-05 8:12 ` David Hildenbrand (Red Hat)
2025-11-05 9:05 ` Xie Yuanbin
2025-11-17 2:09 ` Xie Yuanbin
2025-11-17 13:03 ` David Hildenbrand (Red Hat)
2025-11-18 8:09 ` Xie Yuanbin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251104072306.100738-2-xieyuanbin1@huawei.com \
--to=xieyuanbin1@huawei.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=bp@alien8.de \
--cc=dave.hansen@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=david@redhat.com \
--cc=hpa@zytor.com \
--cc=liaohua4@huawei.com \
--cc=lilinjie8@huawei.com \
--cc=linmiaohe@huawei.com \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=luto@kernel.org \
--cc=mhocko@suse.com \
--cc=mingo@redhat.com \
--cc=nao.horiguchi@gmail.com \
--cc=peterz@infradead.org \
--cc=rppt@kernel.org \
--cc=surenb@google.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=vbabka@suse.cz \
--cc=will@kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox