Skip to contentSkip to conversation

drm/i915: re-enable semaphores by default

PATCH NAK Eugeni Dodonov 7 participants 18 messages Nov 14, 2011 – Nov 16, 2011 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 drm/i915: re-enable semaphores by default

Semaphores seem to fix most of the hangs on SNB and IVB, and do not cause any known regressions as of now.

Let's re-enable them by default to provide a wider testing and coverage.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42696
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40564
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41353
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38862

---
 drivers/gpu/drm/i915/i915_drv.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +2 -2
index cc531bb..71f887a 100644
@@ -58,10 +58,10 @@ module_param_named(powersave, i915_powersave, int, 0600);
 MODULE_PARM_DESC(powersave,
 		"Enable powersavings, fbc, downclocking, etc. (default: true)");
 
-unsigned int i915_semaphores __read_mostly = 0;
+unsigned int i915_semaphores __read_mostly = 1;
 module_param_named(semaphores, i915_semaphores, int, 0600);
 MODULE_PARM_DESC(semaphores,
-		"Use semaphores for inter-ring sync (default: false)");
+		"Use semaphores for inter-ring sync (default: true)");
 
 unsigned int i915_enable_rc6 __read_mostly = 0;
 module_param_named(i915_enable_rc6, i915_enable_rc6, int, 0600);
Signature · 1 line
1.7.7.3
#1 lore raw

PATCH 2/2 drm/i915: re-enable rc6 by default

Most of the rc6-related hangs and major issues were addressed for the past months.

Let's re-enable it by default to provide a more wider testing, and catch the remaining problems.

According to tests, enablement of rc6 results in up to +50% improvements in power usage and battery life, so it certainly would be a nice feature to have enabled by default.

Also, most of the issues related to rc6 seem to came from VTd, so if you are experiencing any problems with it, try disabling VTd in bios or using intel_iommu=off kernel parameter to investigate whether it solves the issue.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38567

---
 drivers/gpu/drm/i915/i915_drv.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +1 -1
index 71f887a..f72f65d 100644
@@ -63,7 +63,7 @@ module_param_named(semaphores, i915_semaphores, int, 0600);
 MODULE_PARM_DESC(semaphores,
 		"Use semaphores for inter-ring sync (default: true)");
 
-unsigned int i915_enable_rc6 __read_mostly = 0;
+unsigned int i915_enable_rc6 __read_mostly = 1;
 module_param_named(i915_enable_rc6, i915_enable_rc6, int, 0600);
 MODULE_PARM_DESC(i915_enable_rc6,
 		"Enable power-saving render C-state 6 (default: true)");
Signature · 1 line
1.7.7.3
Acked-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] drm/i915: re-enable rc6 by default

Quoted 6 lines · On Mon, 14 Nov 2011 18:39:15 -0200 Eugeni Dodonov <[email protected]>…

Most of the rc6-related hangs and major issues were addressed for the past months.

Let's re-enable it by default to provide a more wider testing, and catch the remaining problems.

Quoted 8 lines

According to tests, enablement of rc6 results in up to +50% improvements in power usage and battery life, so it certainly would be a nice feature to have enabled by default.

Also, most of the issues related to rc6 seem to came from VTd, so if you are experiencing any problems with it, try disabling VTd in bios or using intel_iommu=off kernel parameter to investigate whether it solves the issue.

Yes please.

Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw

Re: [PATCH 2/2] drm/i915: re-enable rc6 by default

In reply to Eugeni Dodonov

Hi,

Quoted 2 lines · Eugeni Dodonov

Most of the rc6-related hangs and major issues were addressed for the past months.

which commits should I try to check whether rc6 issue is gone? As of 3.1 kernel, I'm still getting huge screen corruption.

Signature · 1 line
Lukáš Hejtmánek
#4 lore raw

Re: [PATCH 2/2] drm/i915: re-enable rc6 by default

2011/11/14 Lukas Hejtmanek <[email protected]>

Quoted 10 lines

Hi,

Quoted 1 line · Eugeni Dodonov

Most of the rc6-related hangs and major issues were addressed for the

past

Quoted 1 line

months.

which commits should I try to check whether rc6 issue is gone? As of 3.1 kernel, I'm still getting huge screen corruption.

The rc6 issue which are gone are the ones which was causing hard system hangs and gpu hangs.

Corruptions are still out there, if they don't go away when using intel_iommu=off then we'll have to investigate them more in-depth.

I am unable to reproduce any rc6-related corruptions on my machine(s) though. So it looks like this is yet another case in which we'll need to use Sherlock Holmes methods to get to them...

Signature · 2 lines
Eugeni Dodonov
<http://eugeni.dodonov.net/>

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#5 lore raw

Re: [PATCH 2/2] drm/i915: re-enable rc6 by default

Quoted 5 lines · Eugeni Dodonov

The rc6 issue which are gone are the ones which was causing hard system hangs and gpu hangs.

Corruptions are still out there, if they don't go away when using intel_iommu=off then we'll have to investigate them more in-depth.

I disabled iommu in BIOS, so I guess it is not an issue here.

Quoted 3 lines

I am unable to reproduce any rc6-related corruptions on my machine(s) though. So it looks like this is yet another case in which we'll need to use Sherlock Holmes methods to get to them...

are you using SNA? I do on my SNB system.

Signature · 1 line
Lukáš Hejtmánek
#6 lore raw

Re: [PATCH 2/2] drm/i915: re-enable rc6 by default

2011/11/14 Lukas Hejtmanek <[email protected]>

Quoted 6 lines
Quoted 3 lines

I am unable to reproduce any rc6-related corruptions on my machine(s) though. So it looks like this is yet another case in which we'll need to use Sherlock Holmes methods to get to them...

are you using SNA? I do on my SNB system.

Are the issues SNA-specific, or they happen with UXA as well?

I do use both SNA and UXA actually (thanks to
http://cgit.freedesktop.org/~eugeni/xf86-video-intel/ :)).

Signature · 2 lines
Eugeni Dodonov
<http://eugeni.dodonov.net/>

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#7 lore raw

Re: [PATCH 2/2] drm/i915: re-enable rc6 by default

Quoted 4 lines · Eugeni Dodonov

Are the issues SNA-specific, or they happen with UXA as well?

I do use both SNA and UXA actually (thanks to
http://cgit.freedesktop.org/~eugeni/xf86-video-intel/ :)).

I believe they happen with both but with SNA I got regular corruption while with UXA I got accidental corruption. I.e., with SNA I got corrupted window in few minutes, with UXA maybe one corruption per few hours.

But I did not try those Eric's gating patches with UXA.

I got also X server segfaults related to XV video (moving window, resing window with video crashes the X server randomly). Didn't investigate this (getting core file, e.g.) I have X server 1.10, I think there are some fixes around 1.12.

Signature · 1 line
Lukáš Hejtmánek
#8 lore raw

Re: [PATCH 2/2] drm/i915: re-enable rc6 by default

In reply to Eugeni Dodonov
Quoted 15 lines · Eugeni Dodonov

Most of the rc6-related hangs and major issues were addressed for the past months.

Let's re-enable it by default to provide a more wider testing, and catch the remaining problems.

According to tests, enablement of rc6 results in up to +50% improvements in power usage and battery life, so it certainly would be a nice feature to have enabled by default.

Also, most of the issues related to rc6 seem to came from VTd, so if you are experiencing any problems with it, try disabling VTd in bios or using intel_iommu=off kernel parameter to investigate whether it solves the issue.

Quoted 5 lines

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38567

Iirc the same applies to rc6 as to semaphores. We have bug reports that it causes hard-hangs in combination with DMAR. I haven't yet gotten around to poking the relevant reporters whether ppgtt changes anything, because internet access here at the Intel Poland site sucks. So again I think we need to disable this on snb when DMAR is on. -Daniel

Signature · 2 lines
Daniel Vetter
[email protected] - +41 (0) 79 365 57 48 - http://blog.ffwll.ch

A message that is not in the archive (sent off-list or not yet received): CAObL_7HxAt7B7v+CqgTff+ox5eg-=qLkd8jpZGsGAFFHLx73hw@mail.gmail.com

#10 lore raw

Re: [PATCH 2/2] drm/i915: re-enable rc6 by default

Quoted 34 lines · Andrew Lutomirski
Quoted 26 lines · Daniel Vetter
Quoted 17 lines · Eugeni Dodonov

Most of the rc6-related hangs and major issues were addressed for the past
months.

Let's re-enable it by default to provide a more wider testing, and catch the remaining problems.

According to tests, enablement of rc6 results in up to +50% improvements in power usage and battery life, so it certainly would be a nice feature to have enabled by default.

Also, most of the issues related to rc6 seem to came from VTd, so if you are experiencing any problems with it, try disabling VTd in bios or using
intel_iommu=off kernel parameter to investigate whether it solves the issue.

Quoted 5 lines

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38567

Quoted 5 lines

Iirc the same applies to rc6 as to semaphores. We have bug reports that it causes hard-hangs in combination with DMAR. I haven't yet gotten around to poking the relevant reporters whether ppgtt changes anything, because internet access here at the Intel Poland site sucks. So again I think we need to disable this on snb when DMAR is on.

Quoted 6 lines

I can reproduce the semaphore hang easily.  Where are the ppgtt patches/settings to play with?

FWIW, rc6 is a *huge* win on my SNB laptop, and the laptop has always been rock-solid with any set of options.  Maybe this is only an issue on desktop parts, and the 5W difference is a bigger deal on laptops anyway.

Grab the ppgtt branch from my fdo repo:

http://cgit.freedesktop.org/~danvet/drm/

Note that this branch will only work on snb/ivb and that resume is broken. Also, after the first gpu reset ppgtt will get disabled and hence your machine might die rather quickly. So perhaps boot with i915.reset=0 to prevent that.

Testing feedback highly welcome.

Yours, Daniel

Signature · 2 lines
Daniel Vetter
[email protected] - +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Acked-by on v1 1/2
#11 lore raw
In reply to Eugeni Dodonov
Quoted 24 lines · On Mon, 14 Nov 2011 18:39:14 -0200 Eugeni Dodonov <[email protected]>…

Semaphores seem to fix most of the hangs on SNB and IVB, and do not cause any known regressions as of now.

Let's re-enable them by default to provide a wider testing and coverage.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42696
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40564
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41353
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38862

---
 drivers/gpu/drm/i915/i915_drv.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +0 -0
index cc531bb..71f887a 100644
@@ -58,10 +58,10 @@ module_param_named(powersave, i915_powersave, int, 0600);
 MODULE_PARM_DESC(powersave,
 		"Enable powersavings, fbc, downclocking, etc. (default: true)");

drivers/gpu/drm/i915/i915_drv.c module_param_named(powersave, i915_powersave, int, 0600); · line 67

Quoted 10 lines
drivers/gpu/drm/i915/i915_drv.c +2 -2
 
-unsigned int i915_semaphores __read_mostly = 0;
+unsigned int i915_semaphores __read_mostly = 1;
 module_param_named(semaphores, i915_semaphores, int, 0600);
 MODULE_PARM_DESC(semaphores,
-		"Use semaphores for inter-ring sync (default: false)");
+		"Use semaphores for inter-ring sync (default: true)");
 
 unsigned int i915_enable_rc6 __read_mostly = 0;
 module_param_named(i915_enable_rc6, i915_enable_rc6, int, 0600);

I think we should keep them enabled; if one or two fat cats in the 1% still have issues we can debug those without bringing down performance for the other 99%.

Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Nacked-by on v1 1/2 NAK
#12 lore raw
In reply to Eugeni Dodonov
Quoted 5 lines · Eugeni Dodonov

Semaphores seem to fix most of the hangs on SNB and IVB, and do not cause any known regressions as of now.

Let's re-enable them by default to provide a wider testing and coverage.

Quoted 8 lines

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42696
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40564
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41353
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38862

Semaphores are still broken on my snb in combination with DMAR. ppgtt seems to slightly change the failure mode and probably helps in tracking this down, but without ppgtt it's a hard hang a few seconds after login. So we need to check whether DMAR is enabled (on the entire system, i.e. the variable exported for the ilk workaround is not good enough) on snb and then disable it by default. So in this current form:

reproducible hard-hangs)

I don't have anything against enabling this by default on ivb.

Signature · 2 lines
Daniel Vetter
[email protected] - +41 (0) 79 365 57 48 - http://blog.ffwll.ch
#13 lore raw
Quoted 3 lines · Daniel Vetter

So we need to check whether DMAR is enabled (on the entire system, i.e. the variable exported for the ilk workaround is not good enough)

Can you figure out what *would* be sufficient? Getting semaphores turned on for the 99% who aren't enabling VT-d would be a fairly nice performance improvement.

Signature · 1 line
[email protected]

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#14 lore raw
Quoted 9 lines · Keith Packard
Quoted 3 lines · Daniel Vetter

So we need to check whether DMAR is enabled (on the entire system, i.e. the variable exported for the ilk workaround is not good enough)

Can you figure out what *would* be sufficient? Getting semaphores turned on for the 99% who aren't enabling VT-d would be a fairly nice performance improvement.

AFAICT my snb laptop has always been stable with semaphores and VT-d enabled. Is this problem possibly restricted to just desktop machines? I'm happy to test, since my box that can reproduce the hang instantly is still around.

Also, rc6-by-default would be very nice. It decreases the total power consumption on my laptop from over 13W to around 8W. That's huge.

--Andy

#15 lore raw
Quoted 5 lines · Andrew Lutomirski

AFAICT my snb laptop has always been stable with semaphores and VT-d enabled. Is this problem possibly restricted to just desktop machines? I'm happy to test, since my box that can reproduce the hang instantly is still around.

I cannot reproduce those issues on any mobile SNB, but I am out of desktop ones. So perhaps it is a clue.

Jesse, Keith, Daniel, what if we add something like:

...
.has_semaphores=1, .has_rc6=1
...

to i915_drv.c intel_sandybridge_m_info, and take them into account when using default values for those settings?

Signature · 2 lines
Eugeni Dodonov
 <http://eugeni.dodonov.net/>

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#16 lore raw
Quoted 11 lines · On Wed, 16 Nov 2011 17:05:37 -0200 Eugeni Dodonov <[email protected]> wrote:
Quoted 5 lines · Andrew Lutomirski

AFAICT my snb laptop has always been stable with semaphores and VT-d enabled. Is this problem possibly restricted to just desktop machines? I'm happy to test, since my box that can reproduce the hang instantly is still around.

I cannot reproduce those issues on any mobile SNB, but I am out of desktop ones. So perhaps it is a clue.

Quoted 8 lines

Jesse, Keith, Daniel, what if we add something like:

...
.has_semaphores=1, .has_rc6=1
...

to i915_drv.c intel_sandybridge_m_info, and take them into account when using default values for those settings?

Something like that is fine with me, or just doing it in modeset_init for certain chipsets.

Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center
#17 lore raw
In reply to Keith Packard
Quoted 9 lines · Keith Packard
Quoted 3 lines · Daniel Vetter

So we need to check whether DMAR is enabled (on the entire system, i.e. the variable exported for the ilk workaround is not good enough)

Can you figure out what *would* be sufficient? Getting semaphores turned on for the 99% who aren't enabling VT-d would be a fairly nice performance improvement.

Last time I've played around with all the combinations, only intel_iommu=off was good enough to prevent the hang. intel_iommu=igd_off still hangs (which is what the current value exported by the dmar code dopends on, iirc). If I remember things correctly, intel_iommu=off also reliably works around issues for all reporters (both semaphores and rc6).

And for reproducing it, at least here the key ingredient seems to be a kde4 desktop. Spare the jokes ;-)
-Daniel

Signature · 2 lines
Daniel Vetter
[email protected] - +41 (0) 79 365 57 48 - http://blog.ffwll.ch
#18 lore raw
Quoted 6 lines · Daniel Vetter

Last time I've played around with all the combinations, only intel_iommu=off was good enough to prevent the hang. intel_iommu=igd_off still hangs (which is what the current value exported by the dmar code dopends on, iirc). If I remember things correctly, intel_iommu=off also reliably works around issues for all reporters (both semaphores and rc6).

So, the dmar_disabled flag would suffice? Should be trivial to export that and check in our driver.

Signature · 1 line
[email protected]

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx