diff options
| author | Muchun Song <songmuchun@bytedance.com> | 2026-09-10 14:32:43 +0800 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-10-06 17:38:49 -0700 |
| commit | 057847a7faa345b775d006d38dc42221ebe35907 (patch) | |
| tree | 28f0ab8bdf26cd5dbe6eabc9cdb6330fbd50934e /include/linux | |
| parent | 89fb8ed75e3c4991dc596037b825041b91b4cfc5 (diff) | |
mm/sparse-vmemmap: initialize shared tail vmemmap pages on allocation
The shared tail vmemmap page allocated in vmemmap_get_tail() used to be
left uninitialized, because memmap_init_range() would later overwrite it.
That forced users such as HugeTLB to defer the initialization to their own
setup paths.
Now that memmap_init_range() skips shared tail vmemmap pages, initialize
them immediately in vmemmap_get_tail() with init_compound_tail() instead.
This adds initialization at the point where the shared tail page is
allocated. The existing HugeTLB initialization remains necessary until
the compound page order is set and memmap_init_range() starts skipping
shared tails. It is removed when HugeTLB switches to the section-based
mechanism.
Link: https://lore.kernel.org/20260910063256.64386-5-songmuchun@bytedance.com
Signed-off-by: Muchun Song <songmuchun@bytedance.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Acked-by: Qi Zheng <qi.zheng@linux.dev>
Cc: David Hildenbrand (Arm) <david@kernel.org>
Cc: David Laight <david.laight.linux@gmail.com>
Cc: Liam R. Howlett <liam@infradead.org>
Cc: Lorenzo Stoakes <ljs@kernel.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@kernel.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
