summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2026-02-27 12:42:10 +0100
committerThomas Zimmermann <tzimmermann@suse.de>2026-03-11 09:33:43 +0100
commit28e3918179aa75cfd4490b3b0281496ed91d829a (patch)
tree7746c70021ed238ac81b2c0bf44bc2c4ae7089ac /tools/perf/scripts/python/stackcollapse.py
parent06f3662cb3ba95aa895c1036910555a81c8bcd95 (diff)
drm/gem-shmem: Track folio accessed/dirty status in mmap
Invoke folio_mark_accessed() in mmap page faults to add the folio to the memory manager's LRU list. Userspace invokes mmap to get the memory for software rendering. Compositors do the same when creating the final on-screen image, so keeping the pages in LRU makes sense. Avoids paging out graphics buffers when under memory pressure. In pfn_mkwrite, further invoke the folio_mark_dirty() to add the folio for writeback should the underlying file be paged out from system memory. This rarely happens in practice, yet it would corrupt the buffer content. This has little effect on a system's hardware-accelerated rendering, which only mmaps for an initial setup of textures, meshes, shaders, etc. v4: - test for VM_FAULT_NOPAGE before marking folio as accessed (Boris) - test page-array bounds in mkwrite handler (Boris) v3: - rewrite for VM_PFNMAP v2: - adapt to changes in drm_gem_shmem_try_mmap_pmd() Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Link: https://patch.msgid.link/20260227114509.165572-6-tzimmermann@suse.de
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions