mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
1c1914d6e8
DMA buffers allocated from the CMA dma-buf heap get counted under
RssFile for processes that map them and trigger page faults. In
addition to the incorrect accounting reported to userspace, reclaim
behavior was influenced by the MM_FILEPAGES counter until linux 6.8, but
this memory is not reclaimable. [1] Change the CMA dma-buf heap to set
VM_PFNMAP on the VMA so MM does not poke at the memory managed by this
dma-buf heap, and use vmf_insert_pfn to correct the RSS accounting.
The system dma-buf heap does not suffer from this issue since
remap_pfn_range is used during the mmap of the buffer, which also sets
VM_PFNMAP on the VMA.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/mm/vmscan.c?id=fb46e22a9e3863e08aef8815df9f17d0f4b9aede
Fixes:
|
||
---|---|---|
.. | ||
heaps | ||
dma-buf-sysfs-stats.c | ||
dma-buf-sysfs-stats.h | ||
dma-buf.c | ||
dma-fence-array.c | ||
dma-fence-chain.c | ||
dma-fence-unwrap.c | ||
dma-fence.c | ||
dma-heap.c | ||
dma-resv.c | ||
Kconfig | ||
Makefile | ||
selftest.c | ||
selftest.h | ||
selftests.h | ||
st-dma-fence-chain.c | ||
st-dma-fence-unwrap.c | ||
st-dma-fence.c | ||
st-dma-resv.c | ||
sw_sync.c | ||
sync_debug.c | ||
sync_debug.h | ||
sync_file.c | ||
sync_trace.h | ||
udmabuf.c |