include/linux/huge_mm.h | 22 ++++++++++++----- mm/huge_memory.c | 55 ++++++++++++++++++++++++++++++----------- mm/memory-failure.c | 30 +++++++++++++++++++--- 3 files changed, 82 insertions(+), 25 deletions(-)
Hi all,
This patchset is a follow-up of "[PATCH v3] mm/huge_memory: do not change
split_huge_page*() target order silently."[1]. It improves how memory
failure code handles large block size(LBS) folios with
min_order_for_split() > 0. By splitting a large folio containing HW
poisoned pages to min_order_for_split(), the after-split folios without
HW poisoned pages could be freed for reuse. To achieve this, folio split
code needs to set has_hwpoisoned on after-split folios containing HW
poisoned pages.
This patchset includes:
1. A patch sets has_hwpoisoned on the right after-split folios after
scanning all pages in the folios,
2. A patch adds split_huge_page_to_order(),
3. Patch 2 and Patch 3 of "[PATCH v2 0/3] Do not change split folio target
order"[2],
This patchset is based on mm-new.
Changelog
===
From V2[2]:
1. Patch 1 is sent separately as a hotfix[1].
2. set has_hwpoisoned on after-split folios if any contains HW poisoned
pages.
3. added split_huge_page_to_order().
4. added a missing newline after variable decalaration.
5. added /* release= */ to try_to_split_thp_page().
6. restructured try_to_split_thp_page() in memory_failure().
7. fixed a typo.
8. clarified the comment in soft_offline_in_use_page().
Link: https://lore.kernel.org/all/20251017013630.139907-1-ziy@nvidia.com/ [1]
Link: https://lore.kernel.org/all/20251016033452.125479-1-ziy@nvidia.com/ [2]
Zi Yan (4):
mm/huge_memory: preserve PG_has_hwpoisoned if a folio is split to >0
order
mm/huge_memory: add split_huge_page_to_order()
mm/memory-failure: improve large block size folio handling.
mm/huge_memory: fix kernel-doc comments for folio_split() and related.
include/linux/huge_mm.h | 22 ++++++++++++-----
mm/huge_memory.c | 55 ++++++++++++++++++++++++++++++-----------
mm/memory-failure.c | 30 +++++++++++++++++++---
3 files changed, 82 insertions(+), 25 deletions(-)
--
2.51.0
On 21 Oct 2025, at 23:35, Zi Yan wrote: > Hi all, > > This patchset is a follow-up of "[PATCH v3] mm/huge_memory: do not change > split_huge_page*() target order silently."[1]. It improves how memory > failure code handles large block size(LBS) folios with > min_order_for_split() > 0. By splitting a large folio containing HW > poisoned pages to min_order_for_split(), the after-split folios without > HW poisoned pages could be freed for reuse. To achieve this, folio split > code needs to set has_hwpoisoned on after-split folios containing HW > poisoned pages. > > This patchset includes: > 1. A patch sets has_hwpoisoned on the right after-split folios after > scanning all pages in the folios, Based on the discussion with David[1], this patch will be sent separately as a hotfix. The remaining patches will be sent out after Patch 1 is picked up. Please note that I will address David's feedback in the new version of Patch 1. Sorry for the inconvenience. [1] https://lore.kernel.org/all/d3d05898-5530-4990-9d61-8268bd483765@redhat.com/ > 2. A patch adds split_huge_page_to_order(), > 3. Patch 2 and Patch 3 of "[PATCH v2 0/3] Do not change split folio target > order"[2], > > This patchset is based on mm-new. > > Changelog > === > From V2[2]: > 1. Patch 1 is sent separately as a hotfix[1]. > 2. set has_hwpoisoned on after-split folios if any contains HW poisoned > pages. > 3. added split_huge_page_to_order(). > 4. added a missing newline after variable decalaration. > 5. added /* release= */ to try_to_split_thp_page(). > 6. restructured try_to_split_thp_page() in memory_failure(). > 7. fixed a typo. > 8. clarified the comment in soft_offline_in_use_page(). > > > Link: https://lore.kernel.org/all/20251017013630.139907-1-ziy@nvidia.com/ [1] > Link: https://lore.kernel.org/all/20251016033452.125479-1-ziy@nvidia.com/ [2] > > Zi Yan (4): > mm/huge_memory: preserve PG_has_hwpoisoned if a folio is split to >0 > order > mm/huge_memory: add split_huge_page_to_order() > mm/memory-failure: improve large block size folio handling. > mm/huge_memory: fix kernel-doc comments for folio_split() and related. > > include/linux/huge_mm.h | 22 ++++++++++++----- > mm/huge_memory.c | 55 ++++++++++++++++++++++++++++++----------- > mm/memory-failure.c | 30 +++++++++++++++++++--- > 3 files changed, 82 insertions(+), 25 deletions(-) > > -- > 2.51.0 -- Best Regards, Yan, Zi
On 22 Oct 2025, at 16:47, Zi Yan wrote: > On 21 Oct 2025, at 23:35, Zi Yan wrote: > >> Hi all, >> >> This patchset is a follow-up of "[PATCH v3] mm/huge_memory: do not change >> split_huge_page*() target order silently."[1]. It improves how memory >> failure code handles large block size(LBS) folios with >> min_order_for_split() > 0. By splitting a large folio containing HW >> poisoned pages to min_order_for_split(), the after-split folios without >> HW poisoned pages could be freed for reuse. To achieve this, folio split >> code needs to set has_hwpoisoned on after-split folios containing HW >> poisoned pages. >> >> This patchset includes: >> 1. A patch sets has_hwpoisoned on the right after-split folios after >> scanning all pages in the folios, > > Based on the discussion with David[1], this patch will be sent separately this patch is Patch 1. > as a hotfix. The remaining patches will be sent out after Patch 1 is picked > up. Please note that I will address David's feedback in the new version of > Patch 1. Sorry for the inconvenience. > > [1] https://lore.kernel.org/all/d3d05898-5530-4990-9d61-8268bd483765@redhat.com/ > >> 2. A patch adds split_huge_page_to_order(), >> 3. Patch 2 and Patch 3 of "[PATCH v2 0/3] Do not change split folio target >> order"[2], >> >> This patchset is based on mm-new. >> >> Changelog >> === >> From V2[2]: >> 1. Patch 1 is sent separately as a hotfix[1]. >> 2. set has_hwpoisoned on after-split folios if any contains HW poisoned >> pages. >> 3. added split_huge_page_to_order(). >> 4. added a missing newline after variable decalaration. >> 5. added /* release= */ to try_to_split_thp_page(). >> 6. restructured try_to_split_thp_page() in memory_failure(). >> 7. fixed a typo. >> 8. clarified the comment in soft_offline_in_use_page(). >> >> >> Link: https://lore.kernel.org/all/20251017013630.139907-1-ziy@nvidia.com/ [1] >> Link: https://lore.kernel.org/all/20251016033452.125479-1-ziy@nvidia.com/ [2] >> >> Zi Yan (4): >> mm/huge_memory: preserve PG_has_hwpoisoned if a folio is split to >0 >> order >> mm/huge_memory: add split_huge_page_to_order() >> mm/memory-failure: improve large block size folio handling. >> mm/huge_memory: fix kernel-doc comments for folio_split() and related. >> >> include/linux/huge_mm.h | 22 ++++++++++++----- >> mm/huge_memory.c | 55 ++++++++++++++++++++++++++++++----------- >> mm/memory-failure.c | 30 +++++++++++++++++++--- >> 3 files changed, 82 insertions(+), 25 deletions(-) >> >> -- >> 2.51.0 > > > -- > Best Regards, > Yan, Zi -- Best Regards, Yan, Zi
© 2016 - 2026 Red Hat, Inc.