Skip to contentSkip to conversation

drm/i915: set IDICOS to medium uncore resources

PATCH Applied Ben Widawsky 5 participants 11 messages May 4, 2012 – Jul 18, 2012

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

PATCH 1/1 drm/i915: set IDICOS to medium uncore resources

I'm seeing about a 5% FPS improvement across various benchmarks on my IVB i3. Rumor has it that the higher end parts show even more benefit.

This derives from a patch originally given to me by Bernard. The docs are confusing about the definition names (ie. medium really seems like max), but it would seem it gives more cache to the GT at the expense of uncore. This configuration makes the split most in favor of the GT. I've not tried the other IDICOS values.

Cc "Kilarski, Bernard R" <[email protected]>
---
 drivers/gpu/drm/i915/intel_pm.c |    6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/i915/intel_pm.c +6 -0
index 4389234..4af7d2b 100644
@@ -3323,6 +3323,7 @@ static void ivybridge_init_clock_gating(struct drm_device *dev)
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	int pipe;
 	uint32_t dspclk_gate = VRHUNIT_CLOCK_GATE_DISABLE;
+	uint32_t snpcr;
 
 	I915_WRITE(PCH_DSPCLK_GATE_D, dspclk_gate);
 
@@ -3368,6 +3369,11 @@ static void ivybridge_init_clock_gating(struct drm_device *dev)
 	/* WaDisable4x2SubspanOptimization */
 	I915_WRITE(CACHE_MODE_1,
 		   _MASKED_BIT_ENABLE(PIXEL_SUBSPAN_COLLECT_OPT_DISABLE));
+
+	snpcr = I915_READ(GEN6_MBCUNIT_SNPCR);
+	snpcr &= ~GEN6_MBC_SNPCR_MASK;
+	snpcr |= GEN6_MBC_SNPCR_MED;
+	I915_WRITE(GEN6_MBCUNIT_SNPCR, snpcr);
 }
 
 static void valleyview_init_clock_gating(struct drm_device *dev)
Signature · 1 line
1.7.10.1
#1 lore raw
Quoted 8 lines · On Fri, 4 May 2012 18:58:59 -0700 Ben Widawsky <[email protected]> wrote:

I'm seeing about a 5% FPS improvement across various benchmarks on my IVB i3. Rumor has it that the higher end parts show even more benefit.

This derives from a patch originally given to me by Bernard. The docs are confusing about the definition names (ie. medium really seems like max), but it would seem it gives more cache to the GT at the expense of uncore. This configuration makes the split most in favor of the GT. I've not tried the other IDICOS values.

Bringing the IRC discussion here. I think this is really at the expense (though not really) of the CPU, since it allows the GPU to use more of the shared CPU/GPU cache in the uncore.

You can fix up the #define names if you want; the MEDIUM etc may be from an old, incorrect doc. They were added awhile back.

Jesse

#2 lore raw
Quoted 12 lines · Jesse Barnes
Quoted 8 lines · On Fri, 4 May 2012 18:58:59 -0700 Ben Widawsky <[email protected]> wrote:

I'm seeing about a 5% FPS improvement across various benchmarks on my IVB i3. Rumor has it that the higher end parts show even more benefit.

This derives from a patch originally given to me by Bernard. The docs are confusing about the definition names (ie. medium really seems like max), but it would seem it gives more cache to the GT at the expense of uncore. This configuration makes the split most in favor of the GT. I've not tried the other IDICOS values.

Quoted 6 lines

Bringing the IRC discussion here. I think this is really at the expense (though not really) of the CPU, since it allows the GPU to use more of the shared CPU/GPU cache in the uncore.

You can fix up the #define names if you want; the MEDIUM etc may be from an old, incorrect doc. They were added awhile back.

Another perk from me: Can you do some benchmarking of this for snb, too? -Daniel

Signature · 3 lines
Daniel Vetter
Mail: [email protected]
Mobile: +41 (0)79 365 57 48
#3 lore raw
Quoted 17 lines · On Fri, 4 May 2012 23:00:32 +0200 Daniel Vetter <[email protected]> wrote:
Quoted 16 lines · Jesse Barnes
Quoted 8 lines · On Fri, 4 May 2012 18:58:59 -0700 Ben Widawsky <[email protected]> wrote:

I'm seeing about a 5% FPS improvement across various benchmarks on my IVB i3. Rumor has it that the higher end parts show even more benefit.

This derives from a patch originally given to me by Bernard. The docs are confusing about the definition names (ie. medium really seems like max), but it would seem it gives more cache to the GT at the expense of uncore. This configuration makes the split most in favor of the GT. I've not tried the other IDICOS values.

Bringing the IRC discussion here. I think this is really at the expense (though not really) of the CPU, since it allows the GPU to use more of the shared CPU/GPU cache in the uncore.

Quoted 5 lines
Quoted 2 lines

You can fix up the #define names if you want; the MEDIUM etc may be from an old, incorrect doc. They were added awhile back.

Another perk from me: Can you do some benchmarking of this for snb, too? -Daniel

I didn't see such gains on my SNB. I ran half as many benchmarks, one had almost 2% improvement, the other had a slight performance regression.

Honestly, I'm a bit surprised by this, I may spend some more time to see what happens.

Signature · 1 line
Ben Widawsky, Intel Open Source Technology Center
#4 lore raw
In reply to Jesse Barnes
Quoted 12 lines · On Fri, 4 May 2012 13:40:27 -0700 Jesse Barnes <[email protected]> wrote:
Quoted 8 lines · On Fri, 4 May 2012 18:58:59 -0700 Ben Widawsky <[email protected]> wrote:

I'm seeing about a 5% FPS improvement across various benchmarks on my IVB i3. Rumor has it that the higher end parts show even more benefit.

This derives from a patch originally given to me by Bernard. The docs are confusing about the definition names (ie. medium really seems like max), but it would seem it gives more cache to the GT at the expense of uncore. This configuration makes the split most in favor of the GT. I've not tried the other IDICOS values.

Quoted 8 lines

Bringing the IRC discussion here. I think this is really at the expense (though not really) of the CPU, since it allows the GPU to use more of the shared CPU/GPU cache in the uncore.

You can fix up the #define names if you want; the MEDIUM etc may be from an old, incorrect doc. They were added awhile back.

Jesse

The names match current docs. Presumably they mean something to someone. I don't feel the need to modify them as such.

Signature · 1 line
Ben Widawsky, Intel Open Source Technology Center
#5 lore raw
In reply to Ben Widawsky
Quoted 8 lines · Ben Widawsky

I'm seeing about a 5% FPS improvement across various benchmarks on my IVB i3. Rumor has it that the higher end parts show even more benefit.

This derives from a patch originally given to me by Bernard. The docs are confusing about the definition names (ie. medium really seems like max), but it would seem it gives more cache to the GT at the expense of uncore. This configuration makes the split most in favor of the GT. I've not tried the other IDICOS values.

My IVB system started with an SNBPCR value of 0x1b40. To test the effect of this patch, I just smashed the value of the reg at runtime:

Results:
x intel_reg_write 0x900c 0x001b40
+ intel_reg_write 0x900c 0x201b40

citybench:

+------------------------------------------------------------------------------+
|                   xxx                          +                             |
|   x               xxx          +               + +                           |
|   x               xxx          +               +++                           |
|   x               xxx          +            + ++++                           |
|   xx             xxxx          +            + ++++                           |
|x xxx           x xxxx        + +            ++++++ ++                        |
|xxxxx          xxxxxxxx       + + + +        +*++++ ++                        |
|xxxxxxxxx      xxxxxxxx x     +++++ ++++     +*+++++++                        |
|xxxxxxxxx    xxxxxxxxxx x     ++++++++++   ++**+++++++ +          +           |
|xxxxxxxxx  xxxxxxxxxxxxxx    *++++++++++++ ****+*++++++++      +  ++++++     +|
|    |___________AM_________|       |_________A_M_______|                      |
+------------------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x 118       335.779       387.456       354.306     352.63131     12.462796
+ 118       367.324        419.02        386.14     384.47139     10.970918
Difference at 95.0% confidence
	31.8401 +/- 2.99585
	9.02928% +/- 0.849569%
	(Student's t, pooled s = 11.7406)

openarena:

+------------------------------------------------------------------------------+
|         +                ++                                xx xx x  x xx     |
|         +      +         ++ + +                            xxxxxxx xxxxx     |
|        +++  ++++++++++ ++++++ ++ +                    x  xxxxxxxxxxxxxxx   xx|
|++ + ++++++++++++++++++++++++++++ + + +             x  x xxxxxxxxxxxxxxxxxx xx|
|          |_________A________|                              |_____A____|      |
+------------------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x  65         273.5         292.2           284     283.73385     4.2561822
+  65         234.8         263.2         249.9         249.6     6.9873323
Difference at 95.0% confidence
	-34.1338 +/- 1.989
	-12.0302% +/- 0.70101%

nexuiz:

+------------------------------------------------------------------------------+
|                                                                 +            |
|                                                   x        +    +            |
|                                             +     x   x xx *x+  +x           |
|+     +         +        x   *x+x xxx    + x++ + x+*xxxx+x***x+++*x**+x ++  *+|
|                                   |____|____________AAM____M_____|______|    |
+------------------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x  33     74.314888     76.177197     75.424764     75.332161    0.48205891
+  33     73.397254     76.219868     75.584749     75.363209    0.69408523

Using these 3 tests, this patch does not look like a win. Note that OA is the most CPU-bound of these, while nexuiz is usually on the edge between being CPU and GPU-bound, and citybench is definitely GPU limited.

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

#6 lore raw
Quoted 66 lines · On Sun, 06 May 2012 23:51:26 -0700 Eric Anholt <[email protected]> wrote:
Quoted 8 lines · Ben Widawsky

I'm seeing about a 5% FPS improvement across various benchmarks on my IVB i3. Rumor has it that the higher end parts show even more benefit.

This derives from a patch originally given to me by Bernard. The docs are confusing about the definition names (ie. medium really seems like max), but it would seem it gives more cache to the GT at the expense of uncore. This configuration makes the split most in favor of the GT. I've not tried the other IDICOS values.

My IVB system started with an SNBPCR value of 0x1b40. To test the effect of this patch, I just smashed the value of the reg at runtime:

Results:
x intel_reg_write 0x900c 0x001b40
+ intel_reg_write 0x900c 0x201b40

citybench:

+------------------------------------------------------------------------------+
|                   xxx                          +                             |
|   x               xxx          +               + +                           |
|   x               xxx          +               +++                           |
|   x               xxx          +            + ++++                           |
|   xx             xxxx          +            + ++++                           |
|x xxx           x xxxx        + +            ++++++ ++                        |
|xxxxx          xxxxxxxx       + + + +        +*++++ ++                        |
|xxxxxxxxx      xxxxxxxx x     +++++ ++++     +*+++++++                        |
|xxxxxxxxx    xxxxxxxxxx x     ++++++++++   ++**+++++++ +          +           |
|xxxxxxxxx  xxxxxxxxxxxxxx    *++++++++++++ ****+*++++++++      +  ++++++     +|
|    |___________AM_________|       |_________A_M_______|                      |
+------------------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x 118       335.779       387.456       354.306     352.63131     12.462796
+ 118       367.324        419.02        386.14     384.47139     10.970918
Difference at 95.0% confidence
	31.8401 +/- 2.99585
	9.02928% +/- 0.849569%
	(Student's t, pooled s = 11.7406)

openarena:

+------------------------------------------------------------------------------+
|         +                ++                                xx xx x  x xx     |
|         +      +         ++ + +                            xxxxxxx xxxxx     |
|        +++  ++++++++++ ++++++ ++ +                    x  xxxxxxxxxxxxxxx   xx|
|++ + ++++++++++++++++++++++++++++ + + +             x  x xxxxxxxxxxxxxxxxxx xx|
|          |_________A________|                              |_____A____|      |
+------------------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x  65         273.5         292.2           284     283.73385     4.2561822
+  65         234.8         263.2         249.9         249.6     6.9873323
Difference at 95.0% confidence
	-34.1338 +/- 1.989
	-12.0302% +/- 0.70101%

nexuiz:

+------------------------------------------------------------------------------+
|                                                                 +            |
|                                                   x        +    +            |
|                                             +     x   x xx *x+  +x           |
|+     +         +        x   *x+x xxx    + x++ + x+*xxxx+x***x+++*x**+x ++  *+|
|                                   |____|____________AAM____M_____|______|    |
+------------------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x  33     74.314888     76.177197     75.424764     75.332161    0.48205891
+  33     73.397254     76.219868     75.584749     75.363209    0.69408523
Quoted 4 lines

Using these 3 tests, this patch does not look like a win. Note that OA is the most CPU-bound of these, while nexuiz is usually on the edge between being CPU and GPU-bound, and citybench is definitely GPU limited.

Strange. It would be helpful to start to investigate these systems I suppose. This is basically what I see on my SNB (though I use xonotic instead of nexuiz). My SNB is an i7, and my IVB is an i3. Below are the interesting ones from IVB (I've lost OA somehow).

x xonotic_dinq_fps
+ xonotic_poland_fps

+----------------------------------------------------------------------+
|        x       xx                                             +      |
|x x     xx  +*x *x+                                +      +   ++  +  +|
|     |_____A_M___|  |_______________________A_____________M__________||
+----------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x  11     98.398296     101.24008     100.58156     100.19283    0.97987835
+  11     100.33134     109.63333     107.76804      105.6379      3.939517
Difference at 95.0% confidence
        5.44507 +/- 2.55327
        5.43459% +/- 2.54835%
        (Student's t, pooled s = 2.87054)

Not sure why my citybench numbers are so low

x citybench_dinq_fps
+ citybench_poland_fps

+----------------------------------------------------------------------+
|    xxxxxx    x          +               +     +                      |
|+x xxxxxxx xx x          + + +  +        +  ++ +   +         ++  ++  +|
|    |_MA__|              |_________________AM________________|        |
+----------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x  26       196.857       200.568      198.4245     198.56062     0.8468172
+  18        196.69       215.299      208.6485     208.31394     4.8783414
Difference at 95.0% confidence
        9.75333 +/- 1.96251
        4.91202% +/- 0.988368%
        (Student's t, pooled s = 3.17166)
Signature · 1 line
Ben Widawsky, Intel Open Source Technology Center
#7 lore raw
In reply to Eric Anholt
Quoted 66 lines · Eric Anholt
Quoted 8 lines · Ben Widawsky

I'm seeing about a 5% FPS improvement across various benchmarks on my IVB i3. Rumor has it that the higher end parts show even more benefit.

This derives from a patch originally given to me by Bernard. The docs are confusing about the definition names (ie. medium really seems like max), but it would seem it gives more cache to the GT at the expense of uncore. This configuration makes the split most in favor of the GT. I've not tried the other IDICOS values.

My IVB system started with an SNBPCR value of 0x1b40. To test the effect of this patch, I just smashed the value of the reg at runtime:

Results:
x intel_reg_write 0x900c 0x001b40
+ intel_reg_write 0x900c 0x201b40

citybench:

+------------------------------------------------------------------------------+
|                   xxx                          +                             |
|   x               xxx          +               + +                           |
|   x               xxx          +               +++                           |
|   x               xxx          +            + ++++                           |
|   xx             xxxx          +            + ++++                           |
|x xxx           x xxxx        + +            ++++++ ++                        |
|xxxxx          xxxxxxxx       + + + +        +*++++ ++                        |
|xxxxxxxxx      xxxxxxxx x     +++++ ++++     +*+++++++                        |
|xxxxxxxxx    xxxxxxxxxx x     ++++++++++   ++**+++++++ +          +           |
|xxxxxxxxx  xxxxxxxxxxxxxx    *++++++++++++ ****+*++++++++      +  ++++++     +|
|    |___________AM_________|       |_________A_M_______|                      |
+------------------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x 118       335.779       387.456       354.306     352.63131     12.462796
+ 118       367.324        419.02        386.14     384.47139     10.970918
Difference at 95.0% confidence
	31.8401 +/- 2.99585
	9.02928% +/- 0.849569%
	(Student's t, pooled s = 11.7406)

openarena:

+------------------------------------------------------------------------------+
|         +                ++                                xx xx x  x xx     |
|         +      +         ++ + +                            xxxxxxx xxxxx     |
|        +++  ++++++++++ ++++++ ++ +                    x  xxxxxxxxxxxxxxx   xx|
|++ + ++++++++++++++++++++++++++++ + + +             x  x xxxxxxxxxxxxxxxxxx xx|
|          |_________A________|                              |_____A____|      |
+------------------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x  65         273.5         292.2           284     283.73385     4.2561822
+  65         234.8         263.2         249.9         249.6     6.9873323
Difference at 95.0% confidence
	-34.1338 +/- 1.989
	-12.0302% +/- 0.70101%

nexuiz:

+------------------------------------------------------------------------------+
|                                                                 +            |
|                                                   x        +    +            |
|                                             +     x   x xx *x+  +x           |
|+     +         +        x   *x+x xxx    + x++ + x+*xxxx+x***x+++*x**+x ++  *+|
|                                   |____|____________AAM____M_____|______|    |
+------------------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x  33     74.314888     76.177197     75.424764     75.332161    0.48205891
+  33     73.397254     76.219868     75.584749     75.363209    0.69408523
Quoted 4 lines

Using these 3 tests, this patch does not look like a win. Note that OA is the most CPU-bound of these, while nexuiz is usually on the edge between being CPU and GPU-bound, and citybench is definitely GPU limited.

Re-testing, openarena (1024x768) currently is about a 2.5% +/- 0.5% loss (lost the numbers). Also, new tropics numbers:

N Min Max Median Avg Stddev

x  70       21.9718       22.2166       22.1556     22.154501   0.029139432
+  69       22.7246       22.9308       22.8914     22.888735   0.027248939
Difference at 95.0% confidence
	0.734233 +/- 0.00938209
	3.31415% +/- 0.0423485%
	(Student's t, pooled s = 0.0282169)

That swings things in favor of the patch for me.

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

#8 lore raw
In reply to Ben Widawsky
Quoted 11 lines · Ben Widawsky

I'm seeing about a 5% FPS improvement across various benchmarks on my IVB i3. Rumor has it that the higher end parts show even more benefit.

This derives from a patch originally given to me by Bernard. The docs are confusing about the definition names (ie. medium really seems like max), but it would seem it gives more cache to the GT at the expense of uncore. This configuration makes the split most in favor of the GT. I've not tried the other IDICOS values.

Cc "Kilarski, Bernard R" <[email protected]>

Queued for -next, with Eric's ack added. Although I've had fix the patch, it didn't compile :(
-Daniel

Signature · 3 lines
Daniel Vetter
Mail: [email protected]
Mobile: +41 (0)79 365 57 48
#9 lore raw
Quoted 10 lines · Daniel Vetter
Quoted 9 lines · Ben Widawsky

I'm seeing about a 5% FPS improvement across various benchmarks on my IVB i3. Rumor has it that the higher end parts show even more benefit.

This derives from a patch originally given to me by Bernard. The docs are confusing about the definition names (ie. medium really seems like max), but it would seem it gives more cache to the GT at the expense of uncore. This configuration makes the split most in favor of the GT. I've not tried the other IDICOS values.

Quoted 4 lines
Quoted 2 lines
Cc "Kilarski, Bernard R" <[email protected]>

Queued for -next, with Eric's ack added. Although I've had fix the patch, it didn't compile :(

So this introduces a 10% (205 to 185 fps on an i7-3720qm @10x7) performance regression on good old CPU bound padman, but one large win with alpha compositing the same texture over and over again (fishtank 7.8s to 6.8s).

Oh well, there's plenty of overhead in mesa to recover -- reading the profiles it is rate limited by the cpu overhead in i965_dri.so. -Chris

Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
#10 lore raw
Quoted 16 lines · Chris Wilson
Quoted 10 lines · Daniel Vetter
Quoted 9 lines · Ben Widawsky

I'm seeing about a 5% FPS improvement across various benchmarks on my IVB i3. Rumor has it that the higher end parts show even more benefit.

This derives from a patch originally given to me by Bernard. The docs are confusing about the definition names (ie. medium really seems like max), but it would seem it gives more cache to the GT at the expense of uncore. This configuration makes the split most in favor of the GT. I've not tried the other IDICOS values.

Quoted 4 lines
Quoted 2 lines
Cc "Kilarski, Bernard R" <[email protected]>

Queued for -next, with Eric's ack added. Although I've had fix the patch, it didn't compile :(

Quoted 6 lines

So this introduces a 10% (205 to 185 fps on an i7-3720qm @10x7) performance regression on good old CPU bound padman, but one large win with alpha compositing the same texture over and over again (fishtank 7.8s to 6.8s).

Oh well, there's plenty of overhead in mesa to recover -- reading the profiles it is rate limited by the cpu overhead in i965_dri.so.

Yeah, the plan for CPU overhead is threading the dispatch -- it's what every other driver does.

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