Re: [PATCH v7 9/9] mm: always use the zone-device template init path
Mike Rapoport <[email protected]> Tue, 28 Jul 2026 19:48:40 +0300
| Newsgroups | org.kernel.vger.linux-arch,org.kernel.vger.linux-hardening,org.kernel.vger.linux-kernel,org.kvack.linux-mm |
|---|---|
| Message-ID | <178525732063.1556190.16834028754418994747.b4-review@b4> |
> The template path still has a local opt-out predicate for the > page_ref_set tracepoint and keeps a non-template fallback path. This > makes the code more complex without a strong reason to keep the > separate path. > > Use the template path unconditionally after the corresponding seed page > has been initialized: the first head page seeds the head template, and > the first tail page in each compound range seeds the tail template. > > This keeps the first-page seeding logic unchanged, but removes the extra > non-template fallback from the main loops. > > This also means sanitized builds no longer force this path back to the > per-page initialization stores, and an enabled page_ref_set tracepoint > will no longer observe every ZONE_DEVICE initialization-time refcount > assignment. That tradeoff is intentional: this code is still initializing > struct pages before they are handed out, and keeping those local debug > special cases would preserve a separate initialization-only path while > making the common code more complex. Just fold this change into the relevant patches and don't introduce the opt-out at the first place. -- Sincerely yours, Mike.