[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <8e9da8da-20f5-4316-a449-5544d9883c1e@redhat.com>
Date: Fri, 5 Jul 2024 16:03:15 +0200
From: David Hildenbrand <david@...hat.com>
To: ran xiaokai <ranxiaokai627@....com>, akpm@...ux-foundation.org,
corbet@....net, usama.anjum@...labora.com, avagin@...gle.com
Cc: linux-mm@...ck.org, vbabka@...e.cz, svetly.todorov@...verge.com,
ran.xiaokai@....com.cn, ryan.roberts@....com, ziy@...dia.com,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
yangge1116 <yangge1116@....com>
Subject: Re: [PATCH] kpageflags: detect isolated KPF_THP folios
> - } else if (is_zero_pfn(page_to_pfn(page)))
> + else if (folio_test_large(folio) &&
> + folio_test_large_rmappable(folio)) {
> + /* Note: we indicate any THPs here, not just PMD-sized ones */
> + u |= 1 << KPF_THP;
> + } else if (is_huge_zero_folio(folio)) {
> u |= 1 << KPF_ZERO_PAGE;
> + u |= 1 << KPF_THP;
> + } else if (is_zero_pfn(page_to_pfn(page))) {
We should also directly switch to "is_zero_folio(folio)" here
> + u |= 1 << KPF_ZERO_PAGE;
> + }
>
> /*
> * Caveats on high order pages: PG_buddy and PG_slab will only be set
Especially relevant in context of:
https://lkml.kernel.org/r/1720075944-27201-1-git-send-email-yangge1116@126.com
Acked-by: David Hildenbrand <david@...hat.com>
--
Cheers,
David / dhildenb
Powered by blists - more mailing lists