From: David Hildenbrand <david@redhat.com>
To: ran xiaokai <ranxiaokai627@163.com>,
akpm@linux-foundation.org, corbet@lwn.net,
usama.anjum@collabora.com, avagin@google.com
Cc: linux-mm@kvack.org, vbabka@suse.cz, svetly.todorov@memverge.com,
ran.xiaokai@zte.com.cn, ryan.roberts@arm.com, ziy@nvidia.com,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
yangge1116 <yangge1116@126.com>
Subject: Re: [PATCH] kpageflags: detect isolated KPF_THP folios
Date: Fri, 5 Jul 2024 16:03:15 +0200 [thread overview]
Message-ID: <8e9da8da-20f5-4316-a449-5544d9883c1e@redhat.com> (raw)
In-Reply-To: <20240705104343.112680-1-ranxiaokai627@163.com>
> - } 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@redhat.com>
--
Cheers,
David / dhildenb
prev parent reply other threads:[~2024-07-05 14:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-05 10:43 [PATCH] kpageflags: detect isolated KPF_THP folios ran xiaokai
2024-07-05 14:03 ` David Hildenbrand [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8e9da8da-20f5-4316-a449-5544d9883c1e@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=avagin@google.com \
--cc=corbet@lwn.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ran.xiaokai@zte.com.cn \
--cc=ranxiaokai627@163.com \
--cc=ryan.roberts@arm.com \
--cc=svetly.todorov@memverge.com \
--cc=usama.anjum@collabora.com \
--cc=vbabka@suse.cz \
--cc=yangge1116@126.com \
--cc=ziy@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).