AMDGPU DRM Driver To Finally Expose GPU Load Via Sysfs

Written by Michael Larabel in Radeon on 20 June 2018 at 03:37 PM EDT. 9 Comments
RADEON
The AMDGPU DRM driver appears to finally be crossing the milestone of exposing the current GPU load (as a percentage) in a manner that can be easily queried via sysfs.

For years I've been frustrated via the lack of standardization of sysfs/debugfs files among the DRM drivers and some seemingly basic information not being exposed in such a manner that easily benefits various desktop plug-ins, those wanting to script basic monitors/checks/etc around such outputs, and use-cases like with the Phoronix Test Suite for easily querying this information too for its sensor recording. One of the frustrations with the Radeon Linux stack has been that there wasn't a trivial way to read the GPU load usage as a percentage... There's been ways if installing third-party utilities like RadeonTool, but no universal solution nor one that doesn't require root and would be widely available.

Finally -- likely for Linux 4.19 -- the GPU load usage will be reported as a percentage via a sysfs interface. This GPU load indicator is of the overall busy state of all the GPU's blocks and is exposed as a percentage.

AMD's Tom St Denis today posted the long overdue yet small patch for providing such functionality. Right now it's being exposed as a file named gpu_busy_level but there is some talk it might be renamed to something like gpu_busy_percent and will in turn be available via e.g. /sys/class/drm/card0/. Quite a handy addition that can be queried alongside the GPU temperature and various other metrics in a simple yet effective manner.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week