Re: [PATCH v8 0/9] mm: optimize zone-device memmap initialization
From: Li Zhe
Date: Tue Jul 28 2026 - 02:19:58 EST
On 7/28/26 4:57 AM, Andrew Morton wrote:
> On Mon, 27 Jul 2026 20:34:20 +0800 "Li Zhe" <lizhe.67@xxxxxxxxxxxxx> wrote:
>
>> memmap_init_zone_device() can take a noticeable amount of time when large
>> pmem namespaces are bound or rebound, because it initializes nearly
>> identical struct page descriptors one PFN at a time. This series reduces
>> that ZONE_DEVICE memmap initialization overhead by reusing prepared
>> struct page templates and, on x86, using memcpy_nontemporal() for the
>> template copy path.
> Thanks.
>
> Human review started out strong but petered out later in the series.
> This often happens. I'd prefer to wait until it fills out further.
>
> AI review had things to say, as it often does:
> https://sashiko.dev/#/patchset/20260727123429.5673-1-lizhe.67@xxxxxxxxxxxxx
Thanks for the review.
These comments seem to mostly cover the same memcpy_nontemporal(),
MOVNTI alignment, helper-level drain, and sanitizer/tracepoint tradeoff
topics that were discussed for v7.
The v8 changes keep the x86 non-temporal copy path unchanged, except for
making the generic memcpy_nontemporal() fallback a void function-like
macro. The remaining updates are clarifications in the cover letter and
commit messages.
So I do not plan further code changes for these comments at this point,
unless someone points out a problem in the previous discussion.
For the previous discussion, please see:
https://lore.kernel.org/all/20260722081800.90085-1-lizhe.67@xxxxxxxxxxxxx/
Thanks,
Zhe