Re: [v6 04/15] mm/huge_memory: implement device-private THP splitting

2025-09-22 Thread Zi Yan
ng > - Preserve RMAP_EXCLUSIVE semantics for anonymous exclusive folios > - Skip RMP_USE_SHARED_ZEROPAGE for device-private entries as they > don't support shared zero page semantics > > Signed-off-by: Balbir Singh > Cc: David Hildenbrand > Cc: Zi Yan > Cc: Joshua Hahn

Re: [v6 03/15] mm/rmap: extend rmap and migration support device-private entries

2025-09-22 Thread Zi Yan
t; Reviewed-by: SeongJae Park > Cc: David Hildenbrand > Cc: Zi Yan > Cc: Joshua Hahn > Cc: Rakie Kim > Cc: Byungchul Park > Cc: Gregory Price > Cc: Ying Huang > Cc: Alistair Popple > Cc: Oscar Salvador > Cc: Lorenzo Stoakes > Cc: Baolin Wang > Cc: "

Re: [v6 01/15] mm/zone_device: support large zone device private folios

2025-09-19 Thread Zi Yan
On 19 Sep 2025, at 1:01, Balbir Singh wrote: > On 9/18/25 12:49, Zi Yan wrote: >> On 16 Sep 2025, at 8:21, Balbir Singh wrote: >> >>> Add routines to support allocation of large order zone device folios >>> and helper functions for zone device folios, to check if

Re: [v6 02/15] mm/huge_memory: add device-private THP support to PMD operations

2025-09-18 Thread Zi Yan
tthew Brost > Signed-off-by: Balbir Singh > Cc: David Hildenbrand > Cc: Zi Yan > Cc: Joshua Hahn > Cc: Rakie Kim > Cc: Byungchul Park > Cc: Gregory Price > Cc: Ying Huang > Cc: Alistair Popple > Cc: Oscar Salvador > Cc: Lorenzo Stoakes > Cc: Baolin W

Re: [v6 01/15] mm/zone_device: support large zone device private folios

2025-09-17 Thread Zi Yan
d, the existing page_free() callback in > pgmap is called when the folio is freed, this is true for both > PAGE_SIZE and higher order pages. > > Zone device private large folios do not support deferred split and > scan like normal THP folios. > > Signed-off-by: Balbir Singh > Cc

Re: [PATCH v1 16/36] hugetlbfs: cleanup folio in adjust_range_hwpoison()

2025-08-27 Thread Zi Yan
On 27 Aug 2025, at 18:01, David Hildenbrand wrote: > Let's cleanup and simplify the function a bit. > > Signed-off-by: David Hildenbrand > --- > fs/hugetlbfs/inode.c | 33 +++-- > 1 file changed, 11 insertions(+), 22 deletions(-) > LGTM. Rev

Re: [PATCH v1 15/36] hugetlbfs: remove nth_page() usage within folio in adjust_range_hwpoison()

2025-08-27 Thread Zi Yan
1 insertion(+), 1 deletion(-) > LGTM. Reviewed-by: Zi Yan -- Best Regards, Yan, Zi

Re: [PATCH v1 08/36] mm/hugetlb: check for unreasonable folio sizes when registering hstate

2025-08-27 Thread Zi Yan
ther SPARSEMEM without SPARSEMEM_VMEMMAP cannot be configured or > gigantic folios will not exceed a memory section (the case on sparse). > > Signed-off-by: David Hildenbrand > --- > mm/hugetlb.c | 2 ++ > 1 file changed, 2 insertions(+) > LGTM. Reviewed-by: Zi Yan -- Best Regards, Yan, Zi

Re: [PATCH RFC 13/35] mm: simplify folio_page() and folio_page_idx()

2025-08-21 Thread Zi Yan
a folio. + * @folio: The folio. + * @n: Page index within the folio. + * + * This function expects that n does not exceed folio_nr_pages(folio). + * The returned page is relative to the first page of the folio. + */ > > static __always_inline int PageTail(const struct page *page) > { > -- > 2.50.1 Otherwise, Reviewed-by: Zi Yan Best Regards, Yan, Zi

Re: [PATCH RFC 06/35] mm/page_alloc: reject unreasonable folio/compound page sizes in alloc_contig_range_noprof()

2025-08-21 Thread Zi Yan
n that. > > Signed-off-by: David Hildenbrand > --- > include/linux/mm.h | 6 -- > mm/page_alloc.c| 5 - > 2 files changed, 8 insertions(+), 3 deletions(-) > LGTM. Reviewed-by: Zi Yan Best Regards, Yan, Zi

Re: [PATCH RFC 12/35] mm: limit folio/compound page sizes in problematic kernel configs

2025-08-21 Thread Zi Yan
On 21 Aug 2025, at 16:49, David Hildenbrand wrote: > On 21.08.25 22:46, Zi Yan wrote: >> On 21 Aug 2025, at 16:06, David Hildenbrand wrote: >> >>> Let's limit the maximum folio size in problematic kernel config where >>> the memmap is allocated

Re: [PATCH RFC 12/35] mm: limit folio/compound page sizes in problematic kernel configs

2025-08-21 Thread Zi Yan
> + */ > +#define MAX_FOLIO_ORDER PFN_SECTION_SHIFT > +#else > +/* > + * There is no real limit on the folio size. We limit them to the maximum we > + * currently expect. The comment about hugetlbfs is helpful here, since the other folios are still limited by buddy allocator’s MAX

Re: [PATCH RFC 11/35] mm: sanity-check maximum folio size in folio_set_order()

2025-08-21 Thread Zi Yan
ialized > through prepare_compound_head() / prepare_compound_page(). > > Signed-off-by: David Hildenbrand > --- > mm/internal.h | 1 + > 1 file changed, 1 insertion(+) > Reviewed-by: Zi Yan Best Regards, Yan, Zi

Re: [PATCH RFC 01/35] mm: stop making SPARSEMEM_VMEMMAP user-selectable

2025-08-21 Thread Zi Yan
ti > Cc: "David S. Miller" > Cc: Andreas Larsson > Signed-off-by: David Hildenbrand > --- > mm/Kconfig | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > Acked-by: Zi Yan Best Regards, Yan, Zi

Re: [RFC 08/11] mm/thp: add split during migration support

2025-07-08 Thread Zi Yan
On 8 Jul 2025, at 10:38, David Hildenbrand wrote: > On 06.03.25 05:42, Balbir Singh wrote: >> Support splitting pages during THP zone device migration as needed. >> The common case that arises is that after setup, during migrate >> the destination might not be able to allocate MIGRATE_PFN_COMPOUND

Re: [RFC 00/11] THP support for zone device pages

2025-07-04 Thread Zi Yan
changes for us to give it a try? That is, do I need to include any other >>> code from the list to test this out? >>> >> >> Thank you, the patches are built on top of mm-everything-2025-03-04-05-51, >> which >> includes changes by Alistair to fix fs/da

Re: [PATCH 1/2] mm: add gpu active/reclaim per-node stat counters (v2)

2025-06-20 Thread Zi Yan
le pools */ "GPU pages" seems confusing. These are not pages from GPU memory, right? Would the comments below sound better? /* Pages assigned to a GPU object */ /* Pages in shrinkable GPU pools */ Otherwise, Acked-by: Zi Yan -- Best Regards, Yan, Zi

Re: [PATCH v2 3/9] migrate: Remove call to ->writepage

2025-04-05 Thread Zi Yan
mm/migrate.c | 60 ++-- > 1 file changed, 7 insertions(+), 53 deletions(-) > LGTM. Reviewed-by: Zi Yan -- Best Regards, Yan, Zi

Re: [RFC PATCH 13/15] mm: convert MAX_ORDER sized static arrays to dynamic ones.

2021-08-06 Thread Zi Yan
On 6 Aug 2021, at 5:37, Christian König wrote: > Am 05.08.21 um 21:58 schrieb Zi Yan: >> On 5 Aug 2021, at 15:16, Christian König wrote: >> >>> Am 05.08.21 um 21:02 schrieb Zi Yan: >>>> From: Zi Yan >>>> >>>> This prepares for the u

[RFC PATCH 13/15] mm: convert MAX_ORDER sized static arrays to dynamic ones.

2021-08-05 Thread Zi Yan
From: Zi Yan This prepares for the upcoming changes to make MAX_ORDER a boot time parameter instead of compilation time constant. All static arrays with MAX_ORDER size are converted to pointers and their memory is allocated at runtime. free_area array in struct zone is allocated using

Re: [RFC PATCH 13/15] mm: convert MAX_ORDER sized static arrays to dynamic ones.

2021-08-05 Thread Zi Yan
On 5 Aug 2021, at 15:16, Christian König wrote: > Am 05.08.21 um 21:02 schrieb Zi Yan: >> From: Zi Yan >> >> This prepares for the upcoming changes to make MAX_ORDER a boot time >> parameter instead of compilation time constant. All static arrays with >> MAX_ORD

Re: [PATCH v3 4/8] mm/rmap: Split migration into its own function

2021-03-02 Thread Zi Yan
On 26 Feb 2021, at 2:18, Alistair Popple wrote: > Migration is currently implemented as a mode of operation for > try_to_unmap_one() generally specified by passing the TTU_MIGRATION flag > or in the case of splitting a huge anonymous page TTU_SPLIT_FREEZE. > > However it does not have much in comm