mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Li Zhe" <lizhe.67@bytedance.com>
To: "Mike Rapoport" <rppt@kernel.org>, <muchun.song@linux.dev>
Cc: <akpm@linux-foundation.org>, <apopple@nvidia.com>,
	<balbirs@nvidia.com>,  <david@kernel.org>, <osalvador@suse.de>,
	<linux-kernel@vger.kernel.org>,  <linux-mm@kvack.org>
Subject: Re: [PATCH v3 0/2] mm: optimize HugeTLB bootmem hugepage init
Date: Fri, 13 Nov 2026 10:51:15 +0800	[thread overview]
Message-ID: <bc6988cd-b971-4846-a7e9-e7867b0d0880@bytedance.com> (raw)
In-Reply-To: <avXqoKO_5_tPRZ4g@kernel.org>

On 11/13/26 12:34 AM, Mike Rapoport wrote:
> Hi,
>
> On Thu, Nov 12, 2026 at 07:28:14PM +0800, Li Zhe wrote:
>> This series speeds up the fallback initialization path for HugeTLB tail
>> struct pages during boot-time hugepage allocation, when HugeTLB vmemmap
>> optimization (HVO) is unavailable or fails.
>>
>> Patch 1 factors the PFN-dependent template refresh from the ZONE_DEVICE
>> template-copy path into memmap_init_refresh_pfn_fields().  The
>> ZONE_DEVICE path keeps its memcpy_nontemporal() copy primitive.
>>
>> Patch 2 adds a HugeTLB-specific copy helper in
>> hugetlb_folio_init_tail_vmemmap(): initialize the first tail page
>> normally, then initialize the remaining tail pages by copying that page
>> with memcpy() and refreshing only PFN-dependent fields in the destination
>> page.
>>
>> Tested on a v7.4-rc2 base with 4K base pages and 64 boot-time 1G
>> hugepages, measured with a temporary jiffies-based printk.  HVO is
>> unavailable on arm64; on x86-64, hugetlb_free_vmemmap=off was used to
>> exercise the fallback path.
>>
>>    arch    base      with this patch  reduction
>>    arm64   360.8 ms  256.0 ms         29.05%
>>    x86-64  171.0 ms  165.0 ms          3.51%
> Thanks for the numbers!
>   
> The changes are fine, but since they are going to be merged into Muchun's
> series, I'll wait for that for the detailed review.


Thanks Mike.

Muchun, thanks for integrating these patches into your series.

Thanks,
Zhe

>
>> Li Zhe (2):
>>    mm/mm_init: factor out memmap_init_refresh_pfn_fields()
>>    mm/hugetlb: optimize bootmem hugepage tail vmemmap init
>>
>>   mm/hugetlb.c | 23 ++++++++++++++++++-----
>>   mm/mm_init.c | 11 ++++++-----
>>   mm/mm_init.h | 11 +++++++++++
>>   3 files changed, 35 insertions(+), 10 deletions(-)

      reply	other threads:[~2026-11-13  2:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-12 11:28 Li Zhe
2026-11-12 11:28 ` [PATCH v3 1/2] mm/mm_init: factor out memmap_init_refresh_pfn_fields() Li Zhe
2026-11-12 11:28 ` [PATCH v3 2/2] mm/hugetlb: optimize bootmem hugepage tail vmemmap init Li Zhe
2026-11-12 16:34 ` [PATCH v3 0/2] mm: optimize HugeTLB bootmem hugepage init Mike Rapoport
2026-11-13  2:51   ` Li Zhe [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=bc6988cd-b971-4846-a7e9-e7867b0d0880@bytedance.com \
    --to=lizhe.67@bytedance.com \
    --cc=akpm@linux-foundation.org \
    --cc=apopple@nvidia.com \
    --cc=balbirs@nvidia.com \
    --cc=david@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=muchun.song@linux.dev \
    --cc=osalvador@suse.de \
    --cc=rppt@kernel.org \
    /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

all inboxes | Powered by JetHome®