mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-23 16:36:56 -04:00
Just like we have memory.peak, introduce a dmem.peak, which uses the page_counter support for that. For now, make it read-only. This allows for memory usage monitoring without polling dmem.current when the information needed is the maximum device memory used. That can be used for capacity planning, such that dmem.max can be properly setup for a given workload. It can also be used for debugging to determine whether a given workload would have caused eviction or system memory use. Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@igalia.com> Reviewed-by: Michal Koutný <mkoutny@suse.com> Reviewed-by: Maarten Lankhorst <dev@lankhorst.se> Link: https://patch.msgid.link/20260514-dmem_peak-v3-1-b64ce5d3ac38@igalia.com Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>