Proposal Raised To Finally Standardize Video Memory Stats Reporting Under Linux

Phoronix

The idea has been talked about before but in 2026 still hasn't made it to the mainline Linux kernel.... Standardized reporting of video memory statistics that would work across different vendors / kernel graphics drivers. A new proposal was raised today in an effort to get a standardized interface established.

Stemming from a developer wanting to be able to correctly size the swap space during OS installation based on the available video memory of the system, Tvrtko Ursulin of Igalia has been working on getting standardized memory stats for the Direct Rendering Manager (DRM) drivers in a vendor agnostic manner. It's rather silly such functionality hasn't yet been standardized under Linux for working nicely in a cross-vendor/driver fashion (though there is and a using the new device memory cgroup controller where present and enabled).

This newest proposal would provide a standardized interface via sysfs such as /sys/class/drm/card1/memstat/ for then exposing different memory regions such as the vRAM and GTT. For these regions the total memory available (in MB) would be exposed as well as the current amount of used memory for that region.

This wouldn't work without integration on the part of the each of the DRM drivers. A simple DRM driver callback would be needed for each driver for reporting the list of memory regions and their stats. From there they would be exposed in a standardized manner under the "memstat" directory.

For today's request for comments (RFC) discussion on this proposal, Tvrtko Ursulin included a patch demonstrating the interface implemented for the AMDGPU kernel driver.

Those interested can find this standardized memory reporting proposal via the dri-devel list.