[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6833a9b4-5c9a-41cc-b44f-3e3f2592d119@kernel.org>
Date: Tue, 25 Nov 2025 10:34:05 +0100
From: "David Hildenbrand (Red Hat)" <david@...nel.org>
To: Miaohe Lin <linmiaohe@...wei.com>, Zi Yan <ziy@...dia.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Baolin Wang <baolin.wang@...ux.alibaba.com>,
"Liam R. Howlett" <Liam.Howlett@...cle.com>, Nico Pache <npache@...hat.com>,
Ryan Roberts <ryan.roberts@....com>, Dev Jain <dev.jain@....com>,
Barry Song <baohua@...nel.org>, Lance Yang <lance.yang@...ux.dev>,
Naoya Horiguchi <nao.horiguchi@...il.com>,
Wei Yang <richard.weiyang@...il.com>, Balbir Singh <balbirs@...dia.com>,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/4] mm/huge_memory: replace can_split_folio() with
direct refcount calculation
On 11/25/25 10:10, Miaohe Lin wrote:
> On 2025/11/25 5:08, Zi Yan wrote:
>> On 24 Nov 2025, at 14:22, David Hildenbrand (Red Hat) wrote:
>>
>
> <snip>
>
>>
>> BTW, this page flag reuse is really confusing. I see PG_checked is
>> PG_owner_priv_1 too and __folio_migrate_mapping() uses folio_test_swapcache()
>> to decide the number of i_pages entries. Wouldn’t that cause any issue?
>> ext4 does not release_folio() for migration when PG_checked is set,
>> ubifs clears PG_checked in release_folio(). I have not checked all other FS
>> yet. Maybe later.
>
> folio_test_swapbacked() is also checked in folio_test_swapcache:
>
> static __always_inline bool folio_test_swapcache(struct folio *folio)
> {
> return folio_test_swapbacked(folio) &&
> test_bit(PG_swapcache, folio_flags(folio, 0));
> }
>
> So IMHO the reuse of this page flag should work fine.
Ahh, thanks for pointing that out. Confusing, as usually the
folio_test_*() helper are straight bit tests,
All good then :)
--
Cheers
David
Powered by blists - more mailing lists