Kernel Bug Tracker – Bug 13713
[drm/i915] Possible regression due to commit "Change GEM throttling to be 20ms (...)"
Last modified: 2009-08-21 16:38:39 UTC
Some low demanding 3D accelerated applications (tested: quake3-demo, glxgears, stepmania 3.9) seem to suffer from a starvation of some sort. They are unusable and temporarily freeze the X itself.
The applications render their frames in bursts - a few frames show up, then it freezes for a split of a second (X itself too). The bursts occur quite regularly, a few times per second. In quake3-demo while cg_drawfps was enabled, the frame rate would burst between numbers like 50 and 300.
Reverting the commit b962442e46a9340bdbc6711982c59ff0cc2b5afb - "drm/i915: Change GEM throttling to be 20ms like the comment says." fixes the issue for me.
Also, limiting maximum frame rate (com_maxfps) in quake3-demo to about ~50 (1000ms / 20 ms = 50 -- I thought) eliminates the bursts. The greater the limit the stronger the bursts are. Enabling vertical sync seems to help too (as I have 60hz).
I tested against mesa/xorg-server/xf86-video-intel from git, and latest official releases. This happens on all three combination: EXA/UXA/UXA+KMS and regardless of Tiling option.
My laptop: Intel GM965/GL960, 1GB of ram, Intel Core 2 Duo T7100 @ 1.80GHz.
I confirm similar findings.
1) many games, especially neverball are very bursty, like you descrive
2) glxgears performance recently dropped from 950 to 750 FPS.
I changed the throttling timeout to 5 ms, and neverball no longer bursty, and glxgears back to 950 FPS, and maybe googleearth works again without crashes (it does now, but I am not sure that this change did it)
On the other hand increasing the timeout to 300 ms, like I initially did only make this problem much worse.
I also want to note that I couldn't revert this commit, it creates conflicts, and even after a manual merge, still kernel didn't compile
I use -git of everything (updated daily)
Add the commit owner to the CC ..
Author: Eric Anholt <firstname.lastname@example.org>
Date: Wed Jun 3 07:27:35 2009 +0000
drm/i915: Change GEM throttling to be 20ms like the comment says.
First-Bad-Commit : b962442e46a9340bdbc6711982c59ff0cc2b5afb
Notify-Also : Jesse Barnes <email@example.com>
Mesa fix (yes, our mesa driver was really buggy to not have behavior something like this commit):
Author: Eric Anholt <firstname.lastname@example.org>
Date: Tue Jul 21 11:23:18 2009 -0700
intel: Wait on the last swapbuffers to complete before queuing a new one.
This fixes jerkiness in doom3 and other apps since the kernel change to
throttle less absurdly, which led to a thundering herd of frames.
Because this is a rather minimal fix, there is at least one downside: If
the whole scene completes in one batchbuffer, we'll end up stalling the GPU.
Thanks to Michel Dänzer for suggesting using glFlush to signal frame end
instead of going to all the effort of adding a new DRI2 extension.
Was this bug fixed?
I still have the problem on my i915 card... 3D rendering is very choppy (like described in the first comment).
I'm using: xf86-video-intel 2.8.0, xorg-server 1.6.3, latest mesa etc., latest git kernel (built today).
nevermind, mesa from git fixed it.
Should the bug be closed, then?
As stated above:
"Because this is a rather minimal fix, there is at least one downside: If the whole scene completes in one batchbuffer, we'll end up stalling the GPU."
So, this is more of a quick workaround then a fix? Maybe it's not such a good idea to rush with closing the bug, unless it's not (or will not be) kernel related?
I was just asking and I don't get your point. Sorry.
The kernel bugzilla is the wrong place to be tracking a Mesa bug.
(Yes, this should be closed)
Thanks Eric, closing.
FWIW, I followed up with some other possible solutions. It actually seems best overall to handle this in the X driver rather than in the Mesa driver.