Bug 101182 - Reading amdgpu_pm_info causes stutter with Linux 4.12-rc
Summary: Reading amdgpu_pm_info causes stutter with Linux 4.12-rc
Status: RESOLVED WONTFIX
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/AMDgpu (show other bugs)
Version: DRI git
Hardware: Other All
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-25 06:59 UTC by Christoph Haag
Modified: 2017-05-25 13:23 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
screenshot showing the stuttering in the HUD (213.08 KB, image/png)
2017-05-25 07:00 UTC, Christoph Haag
no flags Details

Description Christoph Haag 2017-05-25 06:59:12 UTC
A stutter once wouldn't be so bad, but apps like radeon-profile repeatedly read this file, so rendering stutters constantly.

You will have a hard time spotting it in the average fps graph, but with my (still very inaccurate) low-fps patch at https://github.com/ChristophHaag/mesa-mesa/commit/e097b91a85c85718576589402e075e7f5668e68c it's very visible that there is at least one frame that's delayed a lot each time amdgpu_pm_info is read.
The GPU load does give an independent hint that something is wrong though.

To reproduce:
run  glxgears
run  sudo watch --interval=.3 cat /sys/kernel/debug/dri/0/amdgpu_pm_info
observe stuttering in glxgears.

RX 480, Linux 4.12-rc2.
I haven't tested 4.11 to confirm, but if I remember correctly, this happens in mainline since 4.12.
Comment 1 Christoph Haag 2017-05-25 07:00:35 UTC
Created attachment 131501 [details]
screenshot showing the stuttering in the HUD
Comment 2 Alex Deucher 2017-05-25 13:16:18 UTC
amdgpu_pm_info exposes power statistics now which causes a small delay to sample the power usage.  If you want to poll the current clocks, there is an ioctl interface to query this information.
Comment 3 Christoph Haag 2017-05-25 13:23:36 UTC
Can this be done asynchronously in the driver so it doesn't impact the rendering of 3D applications?


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.