[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACZaFFOZBgdxefH0x2_=U=Ds7yFqcr7DiJM1MHS_73Wrr6jc7w@mail.gmail.com>
Date: Sat, 17 Jan 2026 12:22:08 +0800
From: Vernon Yang <vernon2gm@...il.com>
To: "David Hildenbrand (Red Hat)" <david@...nel.org>
Cc: Lance Yang <lance.yang@...ux.dev>, lorenzo.stoakes@...cle.com, ziy@...dia.com,
akpm@...ux-foundation.org, dev.jain@....com, baohua@...nel.org,
linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Vernon Yang <yanglincheng@...inos.cn>
Subject: Re: [PATCH mm-new v4 4/6] mm: add folio_is_lazyfree helper
On Wed, Jan 14, 2026 at 7:45 PM David Hildenbrand (Red Hat)
<david@...nel.org> wrote:
>
> On 1/11/26 14:41, Lance Yang wrote:
> >
> >
> > On 2026/1/11 20:19, Vernon Yang wrote:
> >> Add folio_is_lazyfree() function to identify lazy-free folios to improve
> >> code readability.
> >>
> >> Signed-off-by: Vernon Yang <yanglincheng@...inos.cn>
> >> ---
> >> include/linux/mm_inline.h | 5 +++++
> >> mm/rmap.c | 2 +-
> >> mm/vmscan.c | 5 ++---
> >> 3 files changed, 8 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h
> >> index fa2d6ba811b5..65a4ae52d915 100644
> >> --- a/include/linux/mm_inline.h
> >> +++ b/include/linux/mm_inline.h
> >> @@ -35,6 +35,11 @@ static inline int page_is_file_lru(struct page *page)
> >> return folio_is_file_lru(page_folio(page));
> >> }
> >>
> >> +static inline int folio_is_lazyfree(const struct folio *folio)
> >> +{
> >
> > It's 2026, could we use bool instead of int?
> >
> > Yeah, I see folio_is_file_lru() uses int but that's legacy ...
>
> Right, and why not call the function folio_test_lazyfree() and move it
> to page-flags.h?
LGTM, I will do it in the next version.
Powered by blists - more mailing lists