[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aALVZdStnPQ-d9PA@debian>
Date: Fri, 18 Apr 2025 15:42:45 -0700
From: Fan Ni <nifan.cxl@...il.com>
To: Matthew Wilcox <willy@...radead.org>
Cc: nifan.cxl@...il.com, muchun.song@...ux.dev, mcgrof@...nel.org,
a.manzanares@...sung.com, dave@...olabs.net,
akpm@...ux-foundation.org, david@...hat.com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/hugetlb: Convert &folio->page to folio_page(folio, 0)
On Wed, Apr 09, 2025 at 04:15:30AM +0100, Matthew Wilcox wrote:
> On Tue, Apr 08, 2025 at 05:49:10PM -0700, nifan.cxl@...il.com wrote:
> > From: Fan Ni <fan.ni@...sung.com>
> >
> > Convert the use of &folio->page to folio_page(folio, 0) where struct
> > filio fits in. This is part of the efforts to move some fields out of
> > struct page to reduce its size.
>
> Thanks for sending the patch. You've mixed together quite a few things;
> I'd suggest focusing on one API at a time.
>
...
> > out:
> > - trace_mm_khugepaged_scan_pmd(mm, &folio->page, writable, referenced,
> > - none_or_zero, result, unmapped);
> > + trace_mm_khugepaged_scan_pmd(mm, folio_page(folio, 0), writable,
> > + referenced, none_or_zero, result,
> > + unmapped);
> > return result;
>
> ditto,
>
> > result = install_pmd
> > - ? set_huge_pmd(vma, haddr, pmd, &folio->page)
> > + ? set_huge_pmd(vma, haddr, pmd, folio_page(folio, 0))
> > : SCAN_SUCCEED;
>
> I feel that set_huge_pmd() should take a folio.
There is a patch on the mailing list for it,
https://lore.kernel.org/linux-mm/20240817095122.2460977-5-wangkefeng.wang@huawei.com/
If the above patch is needed, do_set_pmd() should be converted to use folio.
Fan
Powered by blists - more mailing lists