From: Mike Kravetz <mike.kravetz@oracle.com>
To: Muchun Song <songmuchun@bytedance.com>
Cc: muchun.song@linux.dev, akpm@linux-foundation.org,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/4] mm: hugetlb_vmemmap: convert page to folio
Date: Mon, 4 Dec 2023 16:15:50 -0800 [thread overview]
Message-ID: <20231205001550.GE4129@monkey> (raw)
In-Reply-To: <20231127084645.27017-5-songmuchun@bytedance.com>
On 11/27/23 16:46, Muchun Song wrote:
> There is still some places where it does not be converted to folio,
> this patch convert all of them to folio. And this patch also does
> some trival cleanup to fix the code style problems.
>
> Signed-off-by: Muchun Song <songmuchun@bytedance.com>
> ---
> mm/hugetlb_vmemmap.c | 51 ++++++++++++++++++++++----------------------
> 1 file changed, 25 insertions(+), 26 deletions(-)
...
> @@ -535,9 +535,9 @@ long hugetlb_vmemmap_restore_folios(const struct hstate *h,
> }
>
> /* Return true iff a HugeTLB whose vmemmap should and can be optimized. */
> -static bool vmemmap_should_optimize(const struct hstate *h, const struct page *head)
> +static bool vmemmap_should_optimize_folio(const struct hstate *h, struct folio *folio)
> {
> - if (HPageVmemmapOptimized((struct page *)head))
> + if (folio_test_hugetlb_vmemmap_optimized(folio))
Nice! After this, there is only one remaining use of 'page based'
hugetlb specific flag macros.
mm/memory_hotplug.c: if (HPageMigratable(head))
When that is converted, all those macros can be removed from linux/hugetlb.h
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
--
Mike Kravetz
prev parent reply other threads:[~2023-12-05 0:28 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-27 8:46 [PATCH 0/4] Code simplification and clean-up for hugetlb vmemmap Muchun Song
2023-11-27 8:46 ` [PATCH 1/4] mm: pagewalk: assert write mmap lock only for walking the user page tables Muchun Song
2023-12-01 11:09 ` Kefeng Wang
2023-12-02 8:08 ` Muchun Song
2023-12-02 9:25 ` Kefeng Wang
2023-12-02 9:47 ` Muchun Song
2023-12-04 21:39 ` Mike Kravetz
2023-11-27 8:46 ` [PATCH 2/4] mm: hugetlb_vmemmap: use walk_page_range_novma() to simplify the code Muchun Song
2023-12-04 22:53 ` Mike Kravetz
2023-11-27 8:46 ` [PATCH 3/4] mm: hugetlb_vmemmap: move PageVmemmapSelfHosted() check to split_vmemmap_huge_pmd() Muchun Song
2023-12-04 23:27 ` Mike Kravetz
2023-12-05 2:46 ` Muchun Song
2023-11-27 8:46 ` [PATCH 4/4] mm: hugetlb_vmemmap: convert page to folio Muchun Song
2023-12-05 0:15 ` Mike Kravetz [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=20231205001550.GE4129@monkey \
--to=mike.kravetz@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=muchun.song@linux.dev \
--cc=songmuchun@bytedance.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).