News: 0001658538

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Proposal Raised To Finally Standardize Video Memory Stats Reporting Under Linux

([Linux Kernel] 43 Minutes Ago Video Memory Stats)


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 [1]the dri-devel list .



[1] https://lore.kernel.org/dri-devel/20260917120444.86471-1-tvrtko.ursulin@igalia.com/



Nature to all things fixed the limits fit,
And wisely curbed proud man's pretending wit.
As on the land while here the ocean gains,
In other parts it leaves wide sandy plains;
Thus in the soul while memory prevails,
The solid power of understanding fails;
Where beams of warm imagination play,
The memory's soft figures melt away.
-- Alexander Pope (on runtime bounds checking?)