summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorMuchun Song <muchun.song@linux.dev>2026-09-30 22:06:22 +0800
committerAndrew Morton <akpm@linux-foundation.org>2026-10-08 22:55:07 -0700
commitba9164f880bfe5e58e1706cd38a2b7a975849cdd (patch)
tree39d13b80dcfe65a72427a07f903e53b865fb1315 /tools/perf/scripts/python/stackcollapse.py
parent2ef77f4a7d5a9c3c40c34bd85ceaa617ad520d83 (diff)
mm/sparse-vmemmap: switch device DAX to shared tail vmemmap pages
HugeTLB vmemmap optimization now uses per-zone shared tail vmemmap pages. Device DAX has not been switched to that mechanism yet. Switch device DAX to vmemmap_shared_tail_page() as well. This aligns DAX with HugeTLB by using the common per-zone shared tail vmemmap page. The optimization is enabled only for DEV-DAX through pgmap->vmemmap_shift, which supplies the compound page order recorded in section metadata before vmemmap population. Unlike FS-DAX, DEV-DAX does not modify tail struct pages, so sharing them is safe. Since the shared tail page can now back ZONE_DEVICE vmemmap mappings, initialize its entries with PG_reserved for device zones. Also skip poisoning vmemmap-optimizable sections while their struct pages may be shared. Each PTE mapping the shared device DAX tail page takes a page reference. A sufficiently large range could therefore cycle the reference count back to zero if population were allowed to continue after it became non-positive. Use try_get_page() so further mappings fail at that point. The section population error path tears down mappings created for the failed section, while the warning makes this currently impractical limit visible. [muchun.song@linux.dev: set PG_reserved before preparing the compound tail] Link: https://lore.kernel.org/20260930150748.1134516-1-songmuchun@bytedance.com Link: https://lore.kernel.org/20260930140627.57431-8-songmuchun@bytedance.com Signed-off-by: Muchun Song <muchun.song@linux.dev> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Qi Zheng <qi.zheng@linux.dev> Cc: David Hildenbrand <david@kernel.org> Cc: Oscar Salvador <osalvador@suse.de> Cc: Madhavan Srinivasan <maddy@linux.ibm.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Lorenzo Stoakes <ljs@kernel.org> Cc: Mike Rapoport <rppt@kernel.org> Cc: Nicholas Piggin <npiggin@gmail.com> Cc: Christophe Leroy <chleroy@kernel.org> Cc: Ritesh Harjani (IBM) <ritesh.list@gmail.com> Cc: Shrikanth Hegde <sshegde@linux.ibm.com> Cc: Randy Dunlap <rdunlap@infradead.org> Cc: Lance Yang <lance.yang@linux.dev>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions