lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3ddb66f4-d3a8-4e94-8bae-ba65737a52b4@linux.dev>
Date: Wed, 14 Jan 2026 19:52:24 +0800
From: Lance Yang <lance.yang@...ux.dev>
To: "David Hildenbrand (Red Hat)" <david@...nel.org>,
 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 2026/1/14 19:45, David Hildenbrand (Red Hat) 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?

Yep, that's even better :)


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ