Bug 84648 - Lag/Pause When VRAM->GTT or GTT->VRAM transfer occur
Summary: Lag/Pause When VRAM->GTT or GTT->VRAM transfer occur
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/radeonsi (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-04 04:17 UTC by Mathieu Belanger
Modified: 2015-05-01 21:56 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
HUD showing FPS drop and mem transfer (80.45 KB, text/plain)
2014-10-04 04:17 UTC, Mathieu Belanger
Details
Gallium hud screenshot (80.45 KB, image/png)
2014-10-04 04:18 UTC, Mathieu Belanger
Details
Lags in ETS2 (2.17 MB, image/png)
2015-01-28 20:50 UTC, commiethebeastie
Details
ETS2 with GTT-usage:100 (2.26 MB, image/png)
2015-02-02 22:02 UTC, commiethebeastie
Details
minecraft-1.7.10 mesa-1.4.6 (254.50 KB, image/png)
2015-03-14 17:19 UTC, RandyRowboat
Details
minecraft-1.8.3 mesa-1.4.6 (210.98 KB, image/png)
2015-03-14 17:20 UTC, RandyRowboat
Details

Description Mathieu Belanger 2014-10-04 04:17:22 UTC
Created attachment 107298 [details]
HUD showing FPS drop and mem transfer

I got an lag / pause (stopping for one to +- 5 seconds) when I get transfer of memory from the VRAM to GTT and the opposite, the GTT to VRAM.

It append only on Minecraft (No problem with EVE-Online & Source Engine games), even sometime when it is not on the screen, and in that case, the whole X ui stay locked until the transfer finish. It usually go fine until the VRAM reach between 280-300MB and it start playing with the GTT.

The bug Append with:
Kernel 3.17-rc2+ (did not test the RC1, 3.16 was fine)
Mesa GIT newer than somewhere in the beginning of september.

Note that these don't need to be recent for the two. A old kernel with a new Mesa and a new Kernel with a old Mesa recreate the problem. Having the latest GIT of the two don't fix the problem. (I did in fact update libdrm, llvm, mesa, xf86.... after upgrading the kernel to rc2, thinking something changed and was requiring a newer mesa.

I have attached a screenshot with the Gallium hud showing the FPS and memory.

PS : I thought initially that it was the same as BUG #82050 but got requested to file another bug.
Comment 1 Mathieu Belanger 2014-10-04 04:18:53 UTC
Created attachment 107299 [details]
Gallium hud screenshot
Comment 2 Michel Dänzer 2014-10-06 09:13:47 UTC
(In reply to Mathieu Belanger from comment #0)
> A old kernel with a new Mesa and a new Kernel with a old Mesa recreate the
> problem.

Hmm, that's weird. Can you try bisecting Mesa with an old kernel and/or bisecting the kernel with old Mesa?
Comment 3 commiethebeastie 2014-12-25 17:59:32 UTC
Fixed in linux-3.19rc1.
Comment 4 commiethebeastie 2015-01-28 20:50:29 UTC
Created attachment 112921 [details]
Lags in ETS2
Comment 5 commiethebeastie 2015-01-28 20:51:16 UTC
Confirm this bug with agd5/linux/drm-next-3.20-wip in ETS2 :(
Comment 6 commiethebeastie 2015-02-02 22:02:00 UTC
Created attachment 113077 [details]
ETS2 with GTT-usage:100

My 3Com U.S Robotics modem 56k works more faster than the GART memory.
Comment 7 smoki 2015-02-03 12:37:46 UTC
(In reply to commiethebeastie from comment #6)
> Created attachment 113077 [details]
> ETS2 with GTT-usage:100
> 
> My 3Com U.S Robotics modem 56k works more faster than the GART memory.

 Yeah i can confirm that with ETS2, but also with any earlier 18 Wheels of Steel games (http://en.wikipedia.org/wiki/18_Wheels_of_Steel) played in wine (i have all of them :)) have same very worse stutter... try how it goes with reverting this mesa commit, it fixed that worse stutter in those games for me on Kabini APU... well and other issues:

https://bugs.freedesktop.org/show_bug.cgi?id=88658#c6

 And yeah please use at least kernel 3.19 or later if you test that
Comment 9 commiethebeastie 2015-02-26 16:18:48 UTC
>Does http://cgit.freedesktop.org/mesa/mesa/commit/?id=a338dc01866ce50bf7555ee8dc08491c7f63b585 help?

Possible yes. :)
Comment 10 RandyRowboat 2015-03-14 17:11:09 UTC
https://bugs.freedesktop.org/show_bug.cgi?id=89203 is probably a duplicate of this bug.

I tested it with linux 3.19 and different (git~51b43c5, 10.4.6, 10.3.5) mesa versions, but they don't seem to make a difference. So, no, a338dc01866ce50bf7555ee8dc08491c7f63b585 does not help. Even with mesa 10.3.5, where some people reported this was the the last working version for them, the hangs occured. So it's probably related to some kernel issue, too.

The hangs only seem to occur ( at least surface ) on Minecraft 1.8+. Probably because that was a bigger update and they changed the rendering code significantly. The hangs occur every few seconds and freeze the screen for <5s.
Unfortunately I get a similiar issue with FTB/modded Minecraft 1.7. But this time the game itself runs fine, but whenever I switch the virtual workspace in my window manager (awesomewm), it takes up to several *minutes* until the system reacts again and the screen is updated. This only happens if the game was running for some time -> probably more vram/gtt usage. Even the cursor freezes. Big annoyance.

The testing was done on a HD5850, so r600g is affected, too.
Comment 11 Alex Deucher 2015-03-14 17:15:23 UTC
(In reply to J0k3r from comment #10)
> https://bugs.freedesktop.org/show_bug.cgi?id=89203 is probably a duplicate
> of this bug.
> 
> I tested it with linux 3.19 and different (git~51b43c5, 10.4.6, 10.3.5) mesa
> versions, but they don't seem to make a difference. So, no,
> a338dc01866ce50bf7555ee8dc08491c7f63b585 does not help. Even with mesa
> 10.3.5, where some people reported this was the the last working version for
> them, the hangs occured. So it's probably related to some kernel issue, too.

You might be seeing:
https://bugzilla.kernel.org/show_bug.cgi?id=90741
Comment 12 RandyRowboat 2015-03-14 17:19:30 UTC
Created attachment 114311 [details]
minecraft-1.7.10 mesa-1.4.6
Comment 13 RandyRowboat 2015-03-14 17:20:16 UTC
Created attachment 114312 [details]
minecraft-1.8.3 mesa-1.4.6
Comment 14 RandyRowboat 2015-03-14 17:39:16 UTC
Alex, as I understand it these kernel changes are just going to make it into 4.1. That's a long time in the future. Will the fixes be backported to 3.19/4.0?
Comment 15 Alex Deucher 2015-03-15 21:56:56 UTC
(In reply to J0k3r from comment #14)
> Alex, as I understand it these kernel changes are just going to make it into
> 4.1. That's a long time in the future. Will the fixes be backported to
> 3.19/4.0?

They were applied to 4.0 and they will also show up in the stable kernels.
Comment 16 Mathieu Belanger 2015-05-01 21:56:45 UTC
Tested kernel 4.0 with latest mesa git about 6 days ago.

Bug seam to be fixed :)


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.