From: Wei Yang <richard.weiyang@gmail.com>
To: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Cc: akpm@linux-foundation.org, david@redhat.com,
lorenzo.stoakes@oracle.com, linmiaohe@huawei.com,
tony.luck@intel.com, ziy@nvidia.com,
baolin.wang@linux.alibaba.com, Liam.Howlett@oracle.com,
npache@redhat.com, ryan.roberts@arm.com, dev.jain@arm.com,
baohua@kernel.org, nao.horiguchi@gmail.com,
farrah.chen@intel.com, jiaqiyan@google.com, lance.yang@linux.dev,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/1] mm: prevent poison consumption when splitting THP
Date: Sun, 12 Oct 2025 01:23:38 +0000 [thread overview]
Message-ID: <20251012012338.p5z2oyyymjxa4wni@master> (raw)
In-Reply-To: <20251011075520.320862-1-qiuxu.zhuo@intel.com>
On Sat, Oct 11, 2025 at 03:55:19PM +0800, Qiuxu Zhuo wrote:
[...]
>
>diff --git a/mm/huge_memory.c b/mm/huge_memory.c
>index 9c38a95e9f09..2bf5178cca96 100644
>--- a/mm/huge_memory.c
>+++ b/mm/huge_memory.c
>@@ -4121,6 +4121,9 @@ static bool thp_underused(struct folio *folio)
> if (khugepaged_max_ptes_none == HPAGE_PMD_NR - 1)
> return false;
>
>+ if (folio_contain_hwpoisoned_page(folio))
>+ return false;
>+
> for (i = 0; i < folio_nr_pages(folio); i++) {
> kaddr = kmap_local_folio(folio, i * PAGE_SIZE);
> if (!memchr_inv(kaddr, 0, PAGE_SIZE)) {
>diff --git a/mm/migrate.c b/mm/migrate.c
>index 9e5ef39ce73a..393fc2ffc96e 100644
>--- a/mm/migrate.c
>+++ b/mm/migrate.c
>@@ -305,8 +305,9 @@ static bool try_to_map_unused_to_zeropage(struct page_vma_mapped_walk *pvmw,
> pte_t newpte;
> void *addr;
>
>- if (PageCompound(page))
>+ if (PageCompound(page) || PageHWPoison(page))
> return false;
>+
> VM_BUG_ON_PAGE(!PageAnon(page), page);
> VM_BUG_ON_PAGE(!PageLocked(page), page);
> VM_BUG_ON_PAGE(pte_present(ptep_get(pvmw->pte)), page);
>
The code change LGTM.
Reviewed-by: Wei Yang <richard.weiyang@gmail.com>
>base-commit: e5f0a698b34ed76002dc5cff3804a61c80233a7a
>--
>2.43.0
>
--
Wei Yang
Help you, Help me
next prev parent reply other threads:[~2025-10-12 1:23 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-28 3:28 [PATCH " Qiuxu Zhuo
2025-09-28 21:55 ` Jiaqi Yan
2025-09-29 12:29 ` Miaohe Lin
2025-09-29 13:57 ` Zhuo, Qiuxu
2025-09-29 15:15 ` Jiaqi Yan
2025-09-29 13:27 ` Zhuo, Qiuxu
2025-09-29 15:51 ` Luck, Tony
2025-09-29 16:30 ` Zhuo, Qiuxu
2025-09-29 17:25 ` David Hildenbrand
2025-09-30 1:48 ` Lance Yang
2025-09-30 8:53 ` David Hildenbrand
2025-09-30 10:13 ` Lance Yang
2025-09-30 10:20 ` Lance Yang
2025-09-29 7:34 ` David Hildenbrand
2025-09-29 13:52 ` Zhuo, Qiuxu
2025-09-29 16:12 ` David Hildenbrand
2025-10-12 1:37 ` Wei Yang
2025-10-12 4:23 ` Jiaqi Yan
2025-10-11 7:55 ` [PATCH v2 " Qiuxu Zhuo
2025-10-11 9:09 ` Lance Yang
2025-10-11 18:18 ` Andrew Morton
2025-10-12 1:23 ` Wei Yang [this message]
2025-10-13 17:15 ` Zi Yan
2025-10-14 2:42 ` Miaohe Lin
2025-10-14 14:19 ` [PATCH v3 " Qiuxu Zhuo
2025-10-14 14:29 ` David Hildenbrand
2025-10-14 14:51 ` Zhuo, Qiuxu
2025-10-15 6:49 ` [PATCH v4 " Qiuxu Zhuo
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=20251012012338.p5z2oyyymjxa4wni@master \
--to=richard.weiyang@gmail.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=baohua@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=david@redhat.com \
--cc=dev.jain@arm.com \
--cc=farrah.chen@intel.com \
--cc=jiaqiyan@google.com \
--cc=lance.yang@linux.dev \
--cc=linmiaohe@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=nao.horiguchi@gmail.com \
--cc=npache@redhat.com \
--cc=qiuxu.zhuo@intel.com \
--cc=ryan.roberts@arm.com \
--cc=tony.luck@intel.com \
--cc=ziy@nvidia.com \
/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