From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 94900] HD6950 GPU lockup loop with various steam games (octodad[always], saints row 4[always], dead island[always], grid autosport[sometimes]) Date: Wed, 28 Sep 2016 17:26:26 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1453414919==" Return-path: Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 5D9C56E7F3 for ; Wed, 28 Sep 2016 17:26:26 +0000 (UTC) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1453414919== Content-Type: multipart/alternative; boundary="14750835862.2AFF532a.6653"; charset="UTF-8" --14750835862.2AFF532a.6653 Date: Wed, 28 Sep 2016 17:26:26 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated https://bugs.freedesktop.org/show_bug.cgi?id=3D94900 Heiko changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #125271|0 |1 is obsolete| | --- Comment #28 from Heiko --- Created attachment 126832 --> https://bugs.freedesktop.org/attachment.cgi?id=3D126832&action=3Dedit Possible fix for the lockups The more I look at the sb code the more I dislike it :/ Anyhow, looks like = the GCM pass is b0rked and doesn't like unused ops at all. The problem with that octodad trace is that with a pass through fold_assoc(= ) an ADD_INT op becomes unused, but isn't removed prior to GCM. GCM then moves i= t up to the front of the shader (because there are no users), where the op's src values aren't defined (in that particular case the loop counter variable). = GCM also moves ops up, if the usage count isn't fulfilled yet. Well that's when things get really broken, since it seems to move the loop counter -- or at least the initializer -- to fulfill the usage count. And well, then the GPU finally locks up on the shader (or if mesa is compiled in debug mode, sb sh= ows unset registers), probably due to endlessly looping. I tried to fix GCM, but everytime I thought I've did the right thing, I got either unscheduled ops or wrong levels for the basic blocks. Also, the DONT_HOIST stuff doesn't really seem to work that well either. So I decided to fix the input feeded into the GCM pass, by iteratively remo= ving all unused ops in dce_cleanup. This could also be reducing amount of instructions, that weren't actually removed before. Also optimized valtable= 's use_count(), which gets called 1500+ times for the octodad trace and did iterate over the whole use_info list every time... The (untidied) patch fixes octodad for me. Would be nice, if someone could = test the other problematic games (be sure to test with a debug build, to get an exception rather than a lockup). If it works there as well, I'd clean things up. @Marek, what's the best/usual way to test for performance/instruction count= in mesa changes. I noticed those 'helped'/'hurt'/'+-%' infos and some runtime numbers in commit messages, but I don't know how they are produced :/ --=20 You are receiving this mail because: You are the assignee for the bug.= --14750835862.2AFF532a.6653 Date: Wed, 28 Sep 2016 17:26:26 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated H= eiko changed bug 94900<= /a>
What Removed Added
Attachment #125271 is obsolete   1

Commen= t # 28 on bug 94900<= /a> from Heiko
Created attachment =
126832 [details] [review]
Possible fix for the lockups

The more I look at the sb code the more I dislike it :/ Anyhow, looks like =
the
GCM pass is b0rked and doesn't like unused ops at all.

The problem with that octodad trace is that with a pass through fold_assoc(=
) an
ADD_INT op becomes unused, but isn't removed prior to GCM. GCM then moves i=
t up
to the front of the shader (because there are no users), where the op's src
values aren't defined (in that particular case the loop counter variable). =
GCM
also moves ops up, if the usage count isn't fulfilled yet. Well that's when
things get really broken, since it seems to move the loop counter -- or at
least the initializer -- to fulfill the usage count. And well, then the GPU
finally locks up on the shader (or if mesa is compiled in debug mode, sb sh=
ows
unset registers), probably due to endlessly looping.

I tried to fix GCM, but everytime I thought I've did the right thing, I got
either unscheduled ops or wrong levels for the basic blocks. Also, the
DONT_HOIST stuff doesn't really seem to work that well either.

So I decided to fix the input feeded into the GCM pass, by iteratively remo=
ving
all unused ops in dce_cleanup. This could also be reducing amount of
instructions, that weren't actually removed before. Also optimized valtable=
's
use_count(), which gets called 1500+ times for the octodad trace and did
iterate over the whole use_info list every time...

The (untidied) patch fixes octodad for me. Would be nice, if someone could =
test
the other problematic games (be sure to test with a debug build, to get an
exception rather than a lockup). If it works there as well, I'd clean things
up.

@Marek, what's the best/usual way to test for performance/instruction c=
ount in
mesa changes. I noticed those 'helped'/'hurt'/'+-%' infos and some runtime
numbers in commit messages, but I don't know how they are produced :/


You are receiving this mail because:
  • You are the assignee for the bug.
= --14750835862.2AFF532a.6653-- --===============1453414919== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1453414919==--