Created attachment 49783 [details]
dmesg including pm-suspend event
I get very slow and choppy 3d performance after suspending my computer.
This is valid for glxgears (i-know-it's-not-a-benchmark), kwin and others.
After restarting the 3d application speed seems to be normal/ok again.
17641 frames in 5.0 seconds = 3528.125 FPS
18396 frames in 5.0 seconds = 3679.087 FPS
22768 frames in 5.0 seconds = 4553.543 FPS
18280 frames in 5.0 seconds = 3655.863 FPS
16051 frames in 5.0 seconds = 3210.111 FPS
16030 frames in 5.0 seconds = 3205.946 FPS
18157 frames in 5.0 seconds = 3628.626 FPS
18182 frames in 5.0 seconds = 3636.259 FPS
(-> pm-msuspend here <-)
12270 frames in 19.1 seconds = 641.561 FPS
4518 frames in 5.0 seconds = 903.255 FPS
4721 frames in 5.0 seconds = 944.181 FPS
4750 frames in 5.0 seconds = 949.833 FPS
4724 frames in 5.0 seconds = 944.745 FPS
4759 frames in 5.0 seconds = 951.687 FPS
4535 frames in 5.0 seconds = 905.757 FPS
4557 frames in 5.0 seconds = 911.264 FPS
-mesa(r600g)/ddx/libdrm from git (latest)
If you need more infos/logs, please do not hesitate to ask.
Thank you in advance!
Created attachment 49784 [details]
Created attachment 49785 [details]
Here's my theory on what's happening:
On suspend, all BOs located in VRAM are evicted to GTT using radeon_bo_evict_vram() -> ttm_bo_evict_mm(). There's no mechanism to explicitly try and move these back to VRAM after resume, so some of them probably stay in GTT indefinitely.
Not sure offhand how to address this...
(In reply to comment #3)
> Here's my theory on what's happening:
Another possibility might be that e.g. PAT / MTRR attributes aren't properly restored for some memory areas. Can you attach the following files from before/after suspend/resume:
Created attachment 50767 [details]
Here we go.
Created attachment 50768 [details]
Created attachment 50769 [details]
Created attachment 50770 [details]
Created attachment 50771 [details]
Created attachment 50772 [details]
Created attachment 50773 [details]
Created attachment 50774 [details]
The MTRR/PAT info is the same before and after, but almost 60M worth of BOs moved from VRAM to GTT. So the first theory seems more likely.
That said, I'm not sure which buffer(s) could make such a difference for glxgears...
Is there anything i could try out? I mean this affects
every 3d app including the kwin window manager.
-- GitLab Migration Automatic Message --
This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/399.