* Re: [PATCH] drm/i915: Make RPS EI/thresholds multiple of 25 on SNB
2016-04-20 13:43 [PATCH] drm/i915: Make RPS EI/thresholds multiple of 25 on SNB ville.syrjala
@ 2016-04-20 13:57 ` Chris Wilson
2016-04-20 15:09 ` Ville Syrjälä
` (3 subsequent siblings)
4 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2016-04-20 13:57 UTC (permalink / raw)
To: ville.syrjala; +Cc: intel-gfx, stable, Akash Goel
On Wed, Apr 20, 2016 at 04:43:56PM +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Somehow my SNB GT1 (Dell XPS 8300) gets very unhappy around
> GPU hangs if the RPS EI/thresholds aren't suitably aligned.
> It seems like scheduling/timer interupts stop working somehow
> and things get stuck eg. in usleep_range().
>
> I bisected the problem down to
> commit 8a5864377b12 ("drm/i915/skl: Restructured the gen6_set_rps_thresholds function")
> I observed that before all the values were at least multiples of 25,
> but afterwards they are not. And rounding things up to the next multiple
> of 25 does seem to help, so lets' do that. I also tried roundup(..., 5)
> but that wasn't sufficient. Also I have no idea if we might need this sort of
> thing on gen9+ as well.
>
> These are the original EI/thresholds:
> LOW_POWER
> GEN6_RP_UP_EI 12500
> GEN6_RP_UP_THRESHOLD 11800
> GEN6_RP_DOWN_EI 25000
> GEN6_RP_DOWN_THRESHOLD 21250
> BETWEEN
> GEN6_RP_UP_EI 10250
> GEN6_RP_UP_THRESHOLD 9225
> GEN6_RP_DOWN_EI 25000
> GEN6_RP_DOWN_THRESHOLD 18750
> HIGH_POWER
> GEN6_RP_UP_EI 8000
> GEN6_RP_UP_THRESHOLD 6800
> GEN6_RP_DOWN_EI 25000
> GEN6_RP_DOWN_THRESHOLD 15000
>
> These are after 8a5864377b12:
> LOW_POWER
> GEN6_RP_UP_EI 12500
> GEN6_RP_UP_THRESHOLD 11875
> GEN6_RP_DOWN_EI 25000
> GEN6_RP_DOWN_THRESHOLD 21250
> BETWEEN
> GEN6_RP_UP_EI 10156
> GEN6_RP_UP_THRESHOLD 9140
> GEN6_RP_DOWN_EI 25000
> GEN6_RP_DOWN_THRESHOLD 18750
> HIGH_POWER
> GEN6_RP_UP_EI 7812
> GEN6_RP_UP_THRESHOLD 6640
> GEN6_RP_DOWN_EI 25000
> GEN6_RP_DOWN_THRESHOLD 15000
>
> And these are what we have after this patch:
> LOW_POWER
> GEN6_RP_UP_EI 12500
> GEN6_RP_UP_THRESHOLD 11875
> GEN6_RP_DOWN_EI 25000
> GEN6_RP_DOWN_THRESHOLD 21250
> BETWEEN
> GEN6_RP_UP_EI 10175
> GEN6_RP_UP_THRESHOLD 9150
> GEN6_RP_DOWN_EI 25000
> GEN6_RP_DOWN_THRESHOLD 18750
> HIGH_POWER
> GEN6_RP_UP_EI 7825
> GEN6_RP_UP_THRESHOLD 6650
> GEN6_RP_DOWN_EI 25000
> GEN6_RP_DOWN_THRESHOLD 15000
>
> Cc: stable@vger.kernel.org
> Cc: Akash Goel <akash.goel@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Testcase: igt/kms_pipe_crc_basic/hang-read-crc-pipe-B
> Fixes: 8a5864377b12 ("drm/i915/skl: Restructured the gen6_set_rps_thresholds function")
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Wow. The change is semantically sound, so
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH] drm/i915: Make RPS EI/thresholds multiple of 25 on SNB
2016-04-20 13:43 [PATCH] drm/i915: Make RPS EI/thresholds multiple of 25 on SNB ville.syrjala
2016-04-20 13:57 ` Chris Wilson
@ 2016-04-20 15:09 ` Ville Syrjälä
2016-04-21 6:54 ` ✓ Fi.CI.BAT: success for " Patchwork
` (2 subsequent siblings)
4 siblings, 0 replies; 10+ messages in thread
From: Ville Syrjälä @ 2016-04-20 15:09 UTC (permalink / raw)
To: intel-gfx; +Cc: Akash Goel, stable
On Wed, Apr 20, 2016 at 04:43:56PM +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
The patch subject should probably read
"drm/i915: Make RPS EI/thresholds multiple of 25 on SNB-BDW"
since it does change more than SNB. I'll fix that up when/if I push.
>
> Somehow my SNB GT1 (Dell XPS 8300) gets very unhappy around
> GPU hangs if the RPS EI/thresholds aren't suitably aligned.
> It seems like scheduling/timer interupts stop working somehow
> and things get stuck eg. in usleep_range().
>
> I bisected the problem down to
> commit 8a5864377b12 ("drm/i915/skl: Restructured the gen6_set_rps_thresholds function")
> I observed that before all the values were at least multiples of 25,
> but afterwards they are not. And rounding things up to the next multiple
> of 25 does seem to help, so lets' do that. I also tried roundup(..., 5)
> but that wasn't sufficient. Also I have no idea if we might need this sort of
> thing on gen9+ as well.
>
> These are the original EI/thresholds:
> LOW_POWER
> GEN6_RP_UP_EI 12500
> GEN6_RP_UP_THRESHOLD 11800
> GEN6_RP_DOWN_EI 25000
> GEN6_RP_DOWN_THRESHOLD 21250
> BETWEEN
> GEN6_RP_UP_EI 10250
> GEN6_RP_UP_THRESHOLD 9225
> GEN6_RP_DOWN_EI 25000
> GEN6_RP_DOWN_THRESHOLD 18750
> HIGH_POWER
> GEN6_RP_UP_EI 8000
> GEN6_RP_UP_THRESHOLD 6800
> GEN6_RP_DOWN_EI 25000
> GEN6_RP_DOWN_THRESHOLD 15000
>
> These are after 8a5864377b12:
> LOW_POWER
> GEN6_RP_UP_EI 12500
> GEN6_RP_UP_THRESHOLD 11875
> GEN6_RP_DOWN_EI 25000
> GEN6_RP_DOWN_THRESHOLD 21250
> BETWEEN
> GEN6_RP_UP_EI 10156
> GEN6_RP_UP_THRESHOLD 9140
> GEN6_RP_DOWN_EI 25000
> GEN6_RP_DOWN_THRESHOLD 18750
> HIGH_POWER
> GEN6_RP_UP_EI 7812
> GEN6_RP_UP_THRESHOLD 6640
> GEN6_RP_DOWN_EI 25000
> GEN6_RP_DOWN_THRESHOLD 15000
>
> And these are what we have after this patch:
> LOW_POWER
> GEN6_RP_UP_EI 12500
> GEN6_RP_UP_THRESHOLD 11875
> GEN6_RP_DOWN_EI 25000
> GEN6_RP_DOWN_THRESHOLD 21250
> BETWEEN
> GEN6_RP_UP_EI 10175
> GEN6_RP_UP_THRESHOLD 9150
> GEN6_RP_DOWN_EI 25000
> GEN6_RP_DOWN_THRESHOLD 18750
> HIGH_POWER
> GEN6_RP_UP_EI 7825
> GEN6_RP_UP_THRESHOLD 6650
> GEN6_RP_DOWN_EI 25000
> GEN6_RP_DOWN_THRESHOLD 15000
>
> Cc: stable@vger.kernel.org
> Cc: Akash Goel <akash.goel@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Testcase: igt/kms_pipe_crc_basic/hang-read-crc-pipe-B
> Fixes: 8a5864377b12 ("drm/i915/skl: Restructured the gen6_set_rps_thresholds function")
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/i915_reg.h | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index c21b71c86a6b..08f01f4470cd 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -2948,7 +2948,14 @@ enum skl_disp_power_wells {
> #define GEN6_RP_STATE_CAP _MMIO(MCHBAR_MIRROR_BASE_SNB + 0x5998)
> #define BXT_RP_STATE_CAP _MMIO(0x138170)
>
> -#define INTERVAL_1_28_US(us) (((us) * 100) >> 7)
> +/*
> + * Make these a multiple of magic 25 to avoid SNB (eg. Dell XPS
> + * 8300) freezing up around GPU hangs. Looks as if even
> + * scheduling/timer interrupts start misbehaving if the RPS
> + * EI/thresholds are "bad", leading to a very sluggish or even
> + * frozen machine.
> + */
> +#define INTERVAL_1_28_US(us) roundup(((us) * 100) >> 7, 25)
> #define INTERVAL_1_33_US(us) (((us) * 3) >> 2)
> #define INTERVAL_0_833_US(us) (((us) * 6) / 5)
> #define GT_INTERVAL_FROM_US(dev_priv, us) (IS_GEN9(dev_priv) ? \
> --
> 2.7.4
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread* ✓ Fi.CI.BAT: success for drm/i915: Make RPS EI/thresholds multiple of 25 on SNB
2016-04-20 13:43 [PATCH] drm/i915: Make RPS EI/thresholds multiple of 25 on SNB ville.syrjala
2016-04-20 13:57 ` Chris Wilson
2016-04-20 15:09 ` Ville Syrjälä
@ 2016-04-21 6:54 ` Patchwork
2016-04-21 12:20 ` [Intel-gfx] [PATCH] " Patrik Jakobsson
2016-04-21 12:40 ` ✗ Fi.CI.BAT: warning for " Patchwork
4 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2016-04-21 6:54 UTC (permalink / raw)
To: ville.syrjala; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Make RPS EI/thresholds multiple of 25 on SNB
URL : https://patchwork.freedesktop.org/series/5987/
State : success
== Summary ==
Series 5987v1 drm/i915: Make RPS EI/thresholds multiple of 25 on SNB
http://patchwork.freedesktop.org/api/1.0/series/5987/revisions/1/mbox/
bdw-nuci7 total:194 pass:182 dwarn:0 dfail:0 fail:0 skip:12
bdw-ultra total:194 pass:170 dwarn:0 dfail:0 fail:1 skip:23
bsw-nuc-2 total:193 pass:153 dwarn:0 dfail:0 fail:0 skip:40
byt-nuc total:193 pass:155 dwarn:0 dfail:0 fail:0 skip:38
hsw-brixbox total:194 pass:170 dwarn:0 dfail:0 fail:0 skip:24
ilk-hp8440p total:194 pass:137 dwarn:0 dfail:0 fail:0 skip:57
ivb-t430s total:194 pass:166 dwarn:0 dfail:0 fail:0 skip:28
skl-i7k-2 total:194 pass:168 dwarn:0 dfail:0 fail:1 skip:25
skl-nuci5 total:194 pass:183 dwarn:0 dfail:0 fail:0 skip:11
snb-dellxps failed to connect after reboot
snb-x220t failed to connect after reboot
Results at /archive/results/CI_IGT_test/Patchwork_1960/
eb848ab2b19d25a08ca3b2b5e4b2f74c7f7c962c drm-intel-nightly: 2016y-04m-20d-18h-48m-11s UTC integration manifest
ca6a213 drm/i915: Make RPS EI/thresholds multiple of 25 on SNB
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915: Make RPS EI/thresholds multiple of 25 on SNB
2016-04-20 13:43 [PATCH] drm/i915: Make RPS EI/thresholds multiple of 25 on SNB ville.syrjala
` (2 preceding siblings ...)
2016-04-21 6:54 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2016-04-21 12:20 ` Patrik Jakobsson
2016-04-22 14:26 ` Ville Syrjälä
2016-04-22 17:35 ` Ville Syrjälä
2016-04-21 12:40 ` ✗ Fi.CI.BAT: warning for " Patchwork
4 siblings, 2 replies; 10+ messages in thread
From: Patrik Jakobsson @ 2016-04-21 12:20 UTC (permalink / raw)
To: ville.syrjala; +Cc: intel-gfx, Akash Goel, stable
On Wed, Apr 20, 2016 at 04:43:56PM +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Somehow my SNB GT1 (Dell XPS 8300) gets very unhappy around
> GPU hangs if the RPS EI/thresholds aren't suitably aligned.
> It seems like scheduling/timer interupts stop working somehow
> and things get stuck eg. in usleep_range().
>
> I bisected the problem down to
> commit 8a5864377b12 ("drm/i915/skl: Restructured the gen6_set_rps_thresholds function")
> I observed that before all the values were at least multiples of 25,
> but afterwards they are not. And rounding things up to the next multiple
> of 25 does seem to help, so lets' do that. I also tried roundup(..., 5)
> but that wasn't sufficient. Also I have no idea if we might need this sort of
> thing on gen9+ as well.
Do we need to test for performance regressions on stuff like this? And if so,
who do we ping about this?
OTOH impact should be really small and since this fixes a real problem:
Reviewed-by: Patrik Jakobsson <patrik.jakobsson@linux.intel.com>
>
> These are the original EI/thresholds:
> LOW_POWER
> GEN6_RP_UP_EI 12500
> GEN6_RP_UP_THRESHOLD 11800
> GEN6_RP_DOWN_EI 25000
> GEN6_RP_DOWN_THRESHOLD 21250
> BETWEEN
> GEN6_RP_UP_EI 10250
> GEN6_RP_UP_THRESHOLD 9225
> GEN6_RP_DOWN_EI 25000
> GEN6_RP_DOWN_THRESHOLD 18750
> HIGH_POWER
> GEN6_RP_UP_EI 8000
> GEN6_RP_UP_THRESHOLD 6800
> GEN6_RP_DOWN_EI 25000
> GEN6_RP_DOWN_THRESHOLD 15000
>
> These are after 8a5864377b12:
> LOW_POWER
> GEN6_RP_UP_EI 12500
> GEN6_RP_UP_THRESHOLD 11875
> GEN6_RP_DOWN_EI 25000
> GEN6_RP_DOWN_THRESHOLD 21250
> BETWEEN
> GEN6_RP_UP_EI 10156
> GEN6_RP_UP_THRESHOLD 9140
> GEN6_RP_DOWN_EI 25000
> GEN6_RP_DOWN_THRESHOLD 18750
> HIGH_POWER
> GEN6_RP_UP_EI 7812
> GEN6_RP_UP_THRESHOLD 6640
> GEN6_RP_DOWN_EI 25000
> GEN6_RP_DOWN_THRESHOLD 15000
>
> And these are what we have after this patch:
> LOW_POWER
> GEN6_RP_UP_EI 12500
> GEN6_RP_UP_THRESHOLD 11875
> GEN6_RP_DOWN_EI 25000
> GEN6_RP_DOWN_THRESHOLD 21250
> BETWEEN
> GEN6_RP_UP_EI 10175
> GEN6_RP_UP_THRESHOLD 9150
> GEN6_RP_DOWN_EI 25000
> GEN6_RP_DOWN_THRESHOLD 18750
> HIGH_POWER
> GEN6_RP_UP_EI 7825
> GEN6_RP_UP_THRESHOLD 6650
> GEN6_RP_DOWN_EI 25000
> GEN6_RP_DOWN_THRESHOLD 15000
>
> Cc: stable@vger.kernel.org
> Cc: Akash Goel <akash.goel@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Testcase: igt/kms_pipe_crc_basic/hang-read-crc-pipe-B
> Fixes: 8a5864377b12 ("drm/i915/skl: Restructured the gen6_set_rps_thresholds function")
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/i915_reg.h | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index c21b71c86a6b..08f01f4470cd 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -2948,7 +2948,14 @@ enum skl_disp_power_wells {
> #define GEN6_RP_STATE_CAP _MMIO(MCHBAR_MIRROR_BASE_SNB + 0x5998)
> #define BXT_RP_STATE_CAP _MMIO(0x138170)
>
> -#define INTERVAL_1_28_US(us) (((us) * 100) >> 7)
> +/*
> + * Make these a multiple of magic 25 to avoid SNB (eg. Dell XPS
> + * 8300) freezing up around GPU hangs. Looks as if even
> + * scheduling/timer interrupts start misbehaving if the RPS
> + * EI/thresholds are "bad", leading to a very sluggish or even
> + * frozen machine.
> + */
> +#define INTERVAL_1_28_US(us) roundup(((us) * 100) >> 7, 25)
> #define INTERVAL_1_33_US(us) (((us) * 3) >> 2)
> #define INTERVAL_0_833_US(us) (((us) * 6) / 5)
> #define GT_INTERVAL_FROM_US(dev_priv, us) (IS_GEN9(dev_priv) ? \
> --
> 2.7.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Intel Sweden AB Registered Office: Knarrarnasgatan 15, 164 40 Kista, Stockholm, Sweden Registration Number: 556189-6027
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [Intel-gfx] [PATCH] drm/i915: Make RPS EI/thresholds multiple of 25 on SNB
2016-04-21 12:20 ` [Intel-gfx] [PATCH] " Patrik Jakobsson
@ 2016-04-22 14:26 ` Ville Syrjälä
2016-04-22 17:35 ` Ville Syrjälä
1 sibling, 0 replies; 10+ messages in thread
From: Ville Syrjälä @ 2016-04-22 14:26 UTC (permalink / raw)
To: intel-gfx, Akash Goel, stable
On Thu, Apr 21, 2016 at 02:20:35PM +0200, Patrik Jakobsson wrote:
> On Wed, Apr 20, 2016 at 04:43:56PM +0300, ville.syrjala@linux.intel.com wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > Somehow my SNB GT1 (Dell XPS 8300) gets very unhappy around
> > GPU hangs if the RPS EI/thresholds aren't suitably aligned.
> > It seems like scheduling/timer interupts stop working somehow
> > and things get stuck eg. in usleep_range().
> >
> > I bisected the problem down to
> > commit 8a5864377b12 ("drm/i915/skl: Restructured the gen6_set_rps_thresholds function")
> > I observed that before all the values were at least multiples of 25,
> > but afterwards they are not. And rounding things up to the next multiple
> > of 25 does seem to help, so lets' do that. I also tried roundup(..., 5)
> > but that wasn't sufficient. Also I have no idea if we might need this sort of
> > thing on gen9+ as well.
>
> Do we need to test for performance regressions on stuff like this? And if so,
> who do we ping about this?
I think Chris or the perf team might complain if things go downhill too
much.
>
> OTOH impact should be really small and since this fixes a real problem:
>
> Reviewed-by: Patrik Jakobsson <patrik.jakobsson@linux.intel.com>
>
> >
> > These are the original EI/thresholds:
> > LOW_POWER
> > GEN6_RP_UP_EI 12500
> > GEN6_RP_UP_THRESHOLD 11800
> > GEN6_RP_DOWN_EI 25000
> > GEN6_RP_DOWN_THRESHOLD 21250
> > BETWEEN
> > GEN6_RP_UP_EI 10250
> > GEN6_RP_UP_THRESHOLD 9225
> > GEN6_RP_DOWN_EI 25000
> > GEN6_RP_DOWN_THRESHOLD 18750
> > HIGH_POWER
> > GEN6_RP_UP_EI 8000
> > GEN6_RP_UP_THRESHOLD 6800
> > GEN6_RP_DOWN_EI 25000
> > GEN6_RP_DOWN_THRESHOLD 15000
> >
> > These are after 8a5864377b12:
> > LOW_POWER
> > GEN6_RP_UP_EI 12500
> > GEN6_RP_UP_THRESHOLD 11875
> > GEN6_RP_DOWN_EI 25000
> > GEN6_RP_DOWN_THRESHOLD 21250
> > BETWEEN
> > GEN6_RP_UP_EI 10156
> > GEN6_RP_UP_THRESHOLD 9140
> > GEN6_RP_DOWN_EI 25000
> > GEN6_RP_DOWN_THRESHOLD 18750
> > HIGH_POWER
> > GEN6_RP_UP_EI 7812
> > GEN6_RP_UP_THRESHOLD 6640
> > GEN6_RP_DOWN_EI 25000
> > GEN6_RP_DOWN_THRESHOLD 15000
> >
> > And these are what we have after this patch:
> > LOW_POWER
> > GEN6_RP_UP_EI 12500
> > GEN6_RP_UP_THRESHOLD 11875
> > GEN6_RP_DOWN_EI 25000
> > GEN6_RP_DOWN_THRESHOLD 21250
> > BETWEEN
> > GEN6_RP_UP_EI 10175
> > GEN6_RP_UP_THRESHOLD 9150
> > GEN6_RP_DOWN_EI 25000
> > GEN6_RP_DOWN_THRESHOLD 18750
> > HIGH_POWER
> > GEN6_RP_UP_EI 7825
> > GEN6_RP_UP_THRESHOLD 6650
> > GEN6_RP_DOWN_EI 25000
> > GEN6_RP_DOWN_THRESHOLD 15000
> >
> > Cc: stable@vger.kernel.org
> > Cc: Akash Goel <akash.goel@intel.com>
> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > Testcase: igt/kms_pipe_crc_basic/hang-read-crc-pipe-B
> > Fixes: 8a5864377b12 ("drm/i915/skl: Restructured the gen6_set_rps_thresholds function")
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> > drivers/gpu/drm/i915/i915_reg.h | 9 ++++++++-
> > 1 file changed, 8 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> > index c21b71c86a6b..08f01f4470cd 100644
> > --- a/drivers/gpu/drm/i915/i915_reg.h
> > +++ b/drivers/gpu/drm/i915/i915_reg.h
> > @@ -2948,7 +2948,14 @@ enum skl_disp_power_wells {
> > #define GEN6_RP_STATE_CAP _MMIO(MCHBAR_MIRROR_BASE_SNB + 0x5998)
> > #define BXT_RP_STATE_CAP _MMIO(0x138170)
> >
> > -#define INTERVAL_1_28_US(us) (((us) * 100) >> 7)
> > +/*
> > + * Make these a multiple of magic 25 to avoid SNB (eg. Dell XPS
> > + * 8300) freezing up around GPU hangs. Looks as if even
> > + * scheduling/timer interrupts start misbehaving if the RPS
> > + * EI/thresholds are "bad", leading to a very sluggish or even
> > + * frozen machine.
> > + */
> > +#define INTERVAL_1_28_US(us) roundup(((us) * 100) >> 7, 25)
> > #define INTERVAL_1_33_US(us) (((us) * 3) >> 2)
> > #define INTERVAL_0_833_US(us) (((us) * 6) / 5)
> > #define GT_INTERVAL_FROM_US(dev_priv, us) (IS_GEN9(dev_priv) ? \
> > --
> > 2.7.4
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
> --
> Intel Sweden AB Registered Office: Knarrarnasgatan 15, 164 40 Kista, Stockholm, Sweden Registration Number: 556189-6027
--
Ville Syrjälä
Intel OTC
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH] drm/i915: Make RPS EI/thresholds multiple of 25 on SNB
2016-04-21 12:20 ` [Intel-gfx] [PATCH] " Patrik Jakobsson
2016-04-22 14:26 ` Ville Syrjälä
@ 2016-04-22 17:35 ` Ville Syrjälä
1 sibling, 0 replies; 10+ messages in thread
From: Ville Syrjälä @ 2016-04-22 17:35 UTC (permalink / raw)
To: intel-gfx, Akash Goel, stable
On Thu, Apr 21, 2016 at 02:20:35PM +0200, Patrik Jakobsson wrote:
> On Wed, Apr 20, 2016 at 04:43:56PM +0300, ville.syrjala@linux.intel.com wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > Somehow my SNB GT1 (Dell XPS 8300) gets very unhappy around
> > GPU hangs if the RPS EI/thresholds aren't suitably aligned.
> > It seems like scheduling/timer interupts stop working somehow
> > and things get stuck eg. in usleep_range().
> >
> > I bisected the problem down to
> > commit 8a5864377b12 ("drm/i915/skl: Restructured the gen6_set_rps_thresholds function")
> > I observed that before all the values were at least multiples of 25,
> > but afterwards they are not. And rounding things up to the next multiple
> > of 25 does seem to help, so lets' do that. I also tried roundup(..., 5)
> > but that wasn't sufficient. Also I have no idea if we might need this sort of
> > thing on gen9+ as well.
>
> Do we need to test for performance regressions on stuff like this? And if so,
> who do we ping about this?
>
> OTOH impact should be really small and since this fixes a real problem:
>
> Reviewed-by: Patrik Jakobsson <patrik.jakobsson@linux.intel.com>
Pushed to dinq. Thanks for reviews/acks.
>
> >
> > These are the original EI/thresholds:
> > LOW_POWER
> > GEN6_RP_UP_EI 12500
> > GEN6_RP_UP_THRESHOLD 11800
> > GEN6_RP_DOWN_EI 25000
> > GEN6_RP_DOWN_THRESHOLD 21250
> > BETWEEN
> > GEN6_RP_UP_EI 10250
> > GEN6_RP_UP_THRESHOLD 9225
> > GEN6_RP_DOWN_EI 25000
> > GEN6_RP_DOWN_THRESHOLD 18750
> > HIGH_POWER
> > GEN6_RP_UP_EI 8000
> > GEN6_RP_UP_THRESHOLD 6800
> > GEN6_RP_DOWN_EI 25000
> > GEN6_RP_DOWN_THRESHOLD 15000
> >
> > These are after 8a5864377b12:
> > LOW_POWER
> > GEN6_RP_UP_EI 12500
> > GEN6_RP_UP_THRESHOLD 11875
> > GEN6_RP_DOWN_EI 25000
> > GEN6_RP_DOWN_THRESHOLD 21250
> > BETWEEN
> > GEN6_RP_UP_EI 10156
> > GEN6_RP_UP_THRESHOLD 9140
> > GEN6_RP_DOWN_EI 25000
> > GEN6_RP_DOWN_THRESHOLD 18750
> > HIGH_POWER
> > GEN6_RP_UP_EI 7812
> > GEN6_RP_UP_THRESHOLD 6640
> > GEN6_RP_DOWN_EI 25000
> > GEN6_RP_DOWN_THRESHOLD 15000
> >
> > And these are what we have after this patch:
> > LOW_POWER
> > GEN6_RP_UP_EI 12500
> > GEN6_RP_UP_THRESHOLD 11875
> > GEN6_RP_DOWN_EI 25000
> > GEN6_RP_DOWN_THRESHOLD 21250
> > BETWEEN
> > GEN6_RP_UP_EI 10175
> > GEN6_RP_UP_THRESHOLD 9150
> > GEN6_RP_DOWN_EI 25000
> > GEN6_RP_DOWN_THRESHOLD 18750
> > HIGH_POWER
> > GEN6_RP_UP_EI 7825
> > GEN6_RP_UP_THRESHOLD 6650
> > GEN6_RP_DOWN_EI 25000
> > GEN6_RP_DOWN_THRESHOLD 15000
> >
> > Cc: stable@vger.kernel.org
> > Cc: Akash Goel <akash.goel@intel.com>
> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > Testcase: igt/kms_pipe_crc_basic/hang-read-crc-pipe-B
> > Fixes: 8a5864377b12 ("drm/i915/skl: Restructured the gen6_set_rps_thresholds function")
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> > drivers/gpu/drm/i915/i915_reg.h | 9 ++++++++-
> > 1 file changed, 8 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> > index c21b71c86a6b..08f01f4470cd 100644
> > --- a/drivers/gpu/drm/i915/i915_reg.h
> > +++ b/drivers/gpu/drm/i915/i915_reg.h
> > @@ -2948,7 +2948,14 @@ enum skl_disp_power_wells {
> > #define GEN6_RP_STATE_CAP _MMIO(MCHBAR_MIRROR_BASE_SNB + 0x5998)
> > #define BXT_RP_STATE_CAP _MMIO(0x138170)
> >
> > -#define INTERVAL_1_28_US(us) (((us) * 100) >> 7)
> > +/*
> > + * Make these a multiple of magic 25 to avoid SNB (eg. Dell XPS
> > + * 8300) freezing up around GPU hangs. Looks as if even
> > + * scheduling/timer interrupts start misbehaving if the RPS
> > + * EI/thresholds are "bad", leading to a very sluggish or even
> > + * frozen machine.
> > + */
> > +#define INTERVAL_1_28_US(us) roundup(((us) * 100) >> 7, 25)
> > #define INTERVAL_1_33_US(us) (((us) * 3) >> 2)
> > #define INTERVAL_0_833_US(us) (((us) * 6) / 5)
> > #define GT_INTERVAL_FROM_US(dev_priv, us) (IS_GEN9(dev_priv) ? \
> > --
> > 2.7.4
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
> --
> Intel Sweden AB Registered Office: Knarrarnasgatan 15, 164 40 Kista, Stockholm, Sweden Registration Number: 556189-6027
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
* ✗ Fi.CI.BAT: warning for drm/i915: Make RPS EI/thresholds multiple of 25 on SNB
2016-04-20 13:43 [PATCH] drm/i915: Make RPS EI/thresholds multiple of 25 on SNB ville.syrjala
` (3 preceding siblings ...)
2016-04-21 12:20 ` [Intel-gfx] [PATCH] " Patrik Jakobsson
@ 2016-04-21 12:40 ` Patchwork
2016-04-22 17:18 ` Ville Syrjälä
4 siblings, 1 reply; 10+ messages in thread
From: Patchwork @ 2016-04-21 12:40 UTC (permalink / raw)
To: ville.syrjala; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Make RPS EI/thresholds multiple of 25 on SNB
URL : https://patchwork.freedesktop.org/series/5987/
State : warning
== Summary ==
Series 5987v1 drm/i915: Make RPS EI/thresholds multiple of 25 on SNB
http://patchwork.freedesktop.org/api/1.0/series/5987/revisions/1/mbox/
Test gem_busy:
Subgroup basic-blt:
pass -> SKIP (bsw-nuc-2)
Test kms_flip:
Subgroup basic-flip-vs-wf_vblank:
fail -> PASS (bsw-nuc-2)
bdw-nuci7 total:194 pass:182 dwarn:0 dfail:0 fail:0 skip:12
bdw-ultra total:194 pass:170 dwarn:0 dfail:0 fail:1 skip:23
bsw-nuc-2 total:193 pass:153 dwarn:0 dfail:0 fail:0 skip:40
byt-nuc total:193 pass:155 dwarn:0 dfail:0 fail:0 skip:38
hsw-brixbox total:194 pass:170 dwarn:0 dfail:0 fail:0 skip:24
ilk-hp8440p total:194 pass:137 dwarn:0 dfail:0 fail:0 skip:57
ivb-t430s total:194 pass:166 dwarn:0 dfail:0 fail:0 skip:28
skl-i7k-2 total:194 pass:168 dwarn:0 dfail:0 fail:1 skip:25
skl-nuci5 total:194 pass:183 dwarn:0 dfail:0 fail:0 skip:11
snb-dellxps failed to connect after reboot
snb-x220t failed to connect after reboot
Results at /archive/results/CI_IGT_test/Patchwork_1960/
eb848ab2b19d25a08ca3b2b5e4b2f74c7f7c962c drm-intel-nightly: 2016y-04m-20d-18h-48m-11s UTC integration manifest
ca6a213 drm/i915: Make RPS EI/thresholds multiple of 25 on SNB
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: ✗ Fi.CI.BAT: warning for drm/i915: Make RPS EI/thresholds multiple of 25 on SNB
2016-04-21 12:40 ` ✗ Fi.CI.BAT: warning for " Patchwork
@ 2016-04-22 17:18 ` Ville Syrjälä
2016-04-22 17:38 ` Chris Wilson
0 siblings, 1 reply; 10+ messages in thread
From: Ville Syrjälä @ 2016-04-22 17:18 UTC (permalink / raw)
To: intel-gfx
On Thu, Apr 21, 2016 at 12:40:24PM -0000, Patchwork wrote:
> == Series Details ==
>
> Series: drm/i915: Make RPS EI/thresholds multiple of 25 on SNB
> URL : https://patchwork.freedesktop.org/series/5987/
> State : warning
>
> == Summary ==
>
> Series 5987v1 drm/i915: Make RPS EI/thresholds multiple of 25 on SNB
> http://patchwork.freedesktop.org/api/1.0/series/5987/revisions/1/mbox/
>
> Test gem_busy:
> Subgroup basic-blt:
> pass -> SKIP (bsw-nuc-2)
Someone really should to fix this test to be stable...
> Test kms_flip:
> Subgroup basic-flip-vs-wf_vblank:
> fail -> PASS (bsw-nuc-2)
>
> bdw-nuci7 total:194 pass:182 dwarn:0 dfail:0 fail:0 skip:12
> bdw-ultra total:194 pass:170 dwarn:0 dfail:0 fail:1 skip:23
> bsw-nuc-2 total:193 pass:153 dwarn:0 dfail:0 fail:0 skip:40
> byt-nuc total:193 pass:155 dwarn:0 dfail:0 fail:0 skip:38
> hsw-brixbox total:194 pass:170 dwarn:0 dfail:0 fail:0 skip:24
> ilk-hp8440p total:194 pass:137 dwarn:0 dfail:0 fail:0 skip:57
> ivb-t430s total:194 pass:166 dwarn:0 dfail:0 fail:0 skip:28
> skl-i7k-2 total:194 pass:168 dwarn:0 dfail:0 fail:1 skip:25
> skl-nuci5 total:194 pass:183 dwarn:0 dfail:0 fail:0 skip:11
> snb-dellxps failed to connect after reboot
> snb-x220t failed to connect after reboot
>
> Results at /archive/results/CI_IGT_test/Patchwork_1960/
>
> eb848ab2b19d25a08ca3b2b5e4b2f74c7f7c962c drm-intel-nightly: 2016y-04m-20d-18h-48m-11s UTC integration manifest
> ca6a213 drm/i915: Make RPS EI/thresholds multiple of 25 on SNB
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread