From: "Li Zhe" <lizhe.67@bytedance.com>
To: <rppt@kernel.org>
Cc: <akpm@linux-foundation.org>, <apopple@nvidia.com>,
<arnd@arndb.de>, <bp@alien8.de>, <dave.hansen@linux.intel.com>,
<david@kernel.org>, <kees@kernel.org>,
<linux-arch@vger.kernel.org>, <linux-hardening@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <linux-mm@kvack.org>,
<lizhe.67@bytedance.com>, <mingo@redhat.com>, <tglx@kernel.org>,
<x86@kernel.org>
Subject: Re: [PATCH v2 4/7] mm: extend the template fast path to zone-device compound tails
Date: Mon, 25 May 2026 12:11:43 +0800 [thread overview]
Message-ID: <20260525041143.97194-1-lizhe.67@bytedance.com> (raw)
In-Reply-To: <177953825220.3959652.6200899011132427221.b4-review@b4>
On Sat, 23 May 2026 15:10:52 +0300, rppt@kernel.org wrote:
> On Thu, 21 May 2026 12:01:21 +0800, Li Zhe <lizhe.67@bytedance.com> wrote:
> > diff --git a/mm/mm_init.c b/mm/mm_init.c
> > index 2992711351a0..17a84d4cda01 100644
> > --- a/mm/mm_init.c
> > +++ b/mm/mm_init.c
> > @@ -1084,17 +1084,25 @@ static inline bool zone_device_page_init_optimization_enabled(void)
> > IS_ALIGNED(sizeof(struct page), sizeof(u64));
> > }
> >
> > -static inline void zone_device_template_page_init(struct page *template,
> > - unsigned long pfn,
> > - unsigned long zone_idx,
> > - int nid,
> > - struct dev_pagemap *pgmap)
> > +static inline void zone_device_template_head_page_init(struct page *template,
> > + unsigned long pfn, unsigned long zone_idx, int nid,
> > + struct dev_pagemap *pgmap)
>
> Yeah, two tabs from the start would be better :)
>
> > @@ -1156,12 +1166,28 @@ static void __ref memmap_init_compound(struct page *head,
> > [ ... skip 17 lines ... ]
> > - zone_device_page_init_slow(page, pfn, zone_idx, nid, pgmap);
> > - prep_compound_tail(page, head, order);
> > - set_page_count(page, 0);
> > + if (use_template) {
> > + zone_device_page_init_from_template(page, pfn,
> > + &template);
>
> continue here and there won't be need to indent the slow path.
>
> Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Thanks for the review. I will fix this in the next revision.
Thanks,
Zhe
next prev parent reply other threads:[~2026-05-25 4:12 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-21 4:01 [PATCH v2 0/7] mm: speed up ZONE_DEVICE memmap initialization Li Zhe
2026-05-21 4:01 ` [PATCH v2 1/7] mm: factor zone-device page init helpers out of __init_zone_device_page Li Zhe
2026-05-23 12:10 ` Mike Rapoport
2026-05-25 3:51 ` Li Zhe
2026-05-21 4:01 ` [PATCH v2 2/7] mm: add a set_page_section_from_pfn() helper Li Zhe
2026-05-23 12:10 ` Mike Rapoport
2026-05-21 4:01 ` [PATCH v2 3/7] mm: add a template-based fast path for zone-device page init Li Zhe
2026-05-23 12:10 ` Mike Rapoport
2026-05-25 4:02 ` Li Zhe
2026-05-21 4:01 ` [PATCH v2 4/7] mm: extend the template fast path to zone-device compound tails Li Zhe
2026-05-23 12:10 ` Mike Rapoport
2026-05-25 4:11 ` Li Zhe [this message]
2026-05-21 4:01 ` [PATCH v2 5/7] string: introduce memcpy_streaming() helpers Li Zhe
2026-05-21 4:01 ` [PATCH v2 6/7] x86/string: extend memcpy_flushcache() fixed-size fastpaths Li Zhe
2026-05-21 4:01 ` [PATCH v2 7/7] mm: use memcpy_streaming() in zone-device template copies Li Zhe
2026-05-23 12:10 ` Mike Rapoport
2026-05-25 4:59 ` Li Zhe
2026-05-21 22:20 ` [PATCH v2 0/7] mm: speed up ZONE_DEVICE memmap initialization Andrew Morton
2026-05-22 7:49 ` Li Zhe
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=20260525041143.97194-1-lizhe.67@bytedance.com \
--to=lizhe.67@bytedance.com \
--cc=akpm@linux-foundation.org \
--cc=apopple@nvidia.com \
--cc=arnd@arndb.de \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=david@kernel.org \
--cc=kees@kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@redhat.com \
--cc=rppt@kernel.org \
--cc=tglx@kernel.org \
--cc=x86@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®