Adrián Larumbe 553c84892b drm/drm_file: Add DRM obj's RSS reporting function for fdinfo
Some BO's might be mapped onto physical memory chunkwise and on demand,
like Panfrost's tiler heap. In this case, even though the
drm_gem_shmem_object page array might already be allocated, only a very
small fraction of the BO is currently backed by system memory, but
drm_show_memory_stats will then proceed to add its entire virtual size to
the file's total resident size regardless.

This led to very unrealistic RSS sizes being reckoned for Panfrost, where
said tiler heap buffer is initially allocated with a virtual size of 128
MiB, but only a small part of it will eventually be backed by system memory
after successive GPU page faults.

Provide a new DRM object generic function that would allow drivers to
return a more accurate RSS and purgeable sizes for their BOs.

Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230929181616.2769345-5-adrian.larumbe@collabora.com
2023-10-04 13:04:15 +02:00
..
2021-07-29 09:12:01 +02:00
2023-09-20 15:27:44 +02:00
2021-08-13 17:50:48 +02:00
2021-11-30 09:41:28 +01:00
2023-05-22 12:23:50 +02:00
2023-02-24 12:58:55 -08:00
2022-06-27 13:45:48 +02:00
2023-07-11 09:23:20 +02:00
2021-10-04 12:06:14 +02:00
2023-06-02 20:05:45 +03:00
2023-02-16 12:29:51 +02:00