linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Xie Yuanbin <xieyuanbin1@huawei.com>
To: <tglx@linutronix.de>, <david@redhat.com>, <mingo@redhat.com>,
	<bp@alien8.de>, <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: Re: [PATCH 1/2] x86/mm: support memory-failure on 32-bits with SPARSEMEM
Date: Mon, 3 Nov 2025 21:23:58 +0800	[thread overview]
Message-ID: <20251103132358.79766-1-xieyuanbin1@huawei.com> (raw)
In-Reply-To: <5ace86cc-0b2d-4306-8bc1-dfc34cccef1a@redhat.com>

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


  reply	other threads:[~2025-11-03 13:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-03  3:35 Xie Yuanbin
2025-11-03  3:35 ` [PATCH 2/2] mm/memory-failure: remove the selection of RAS Xie Yuanbin
2025-11-03 12:15   ` David Hildenbrand
2025-11-03 12:39     ` Borislav Petkov
2025-11-04  2:20       ` [PATCH 1/2] x86/mm: support memory-failure on 32-bits with SPARSEMEM Xie Yuanbin
2025-11-03 12:08 ` David Hildenbrand
2025-11-03 13:23   ` Xie Yuanbin [this message]
2025-11-03 14:43     ` Dave Hansen

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=20251103132358.79766-1-xieyuanbin1@huawei.com \
    --to=xieyuanbin1@huawei.com \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=bp@alien8.de \
    --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