[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <40381c7e-3f0a-4459-a287-4e098e9a4b13@kernel.org>
Date: Wed, 14 Jan 2026 12:45:06 +0100
From: "David Hildenbrand (Red Hat)" <david@...nel.org>
To: Lance Yang <lance.yang@...ux.dev>, Vernon Yang <vernon2gm@...il.com>
Cc: 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 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?
No strong opinion, just a thought.
Acked-by: David Hildenbrand (Red Hat) <david@...nel.org>
--
Cheers
David
Powered by blists - more mailing lists