All of lore.kernel.org
 help / color / mirror / Atom feed
* IVB GPU turbo
@ 2012-05-17 20:11 Joe Bloggsian
  2012-05-18 21:25 ` Jesse Barnes
  0 siblings, 1 reply; 4+ messages in thread
From: Joe Bloggsian @ 2012-05-17 20:11 UTC (permalink / raw)
  To: intel-gfx

Hi,

We are looking at accelerating video operations using 
vaapi/intel-driver. When using Ivy bridge we believe that the GPU is 
(almost always) not turboing even when 100% busy doing vaapi video 
things (e.g. image scaling on EUs or bitstream decode). To determined 
this we use cat /sys/kernel/debug/dri/0/i915_cur_delayinfo and GPU top 
(todays IVB fixed vesion). We have tried a variety of IVB parts from 
3610QE up to 3770 - all do the same. We've mainly been using kernel 
3.2.0-24-generic and libdrm 2.4.32. The same machines turbo correctly 
when doing equivent things in windows using intel media SDK.

I get the impression from mailing lists that turbo is known to have 
driver/sw issues. Can anyone suggest if there is a later kernel/drm 
version that might improve things? If so where do we find it? This is 
for evaluation so we're happy to try unstable latest software.

Thanks!
Bloggsian

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: IVB GPU turbo
  2012-05-17 20:11 IVB GPU turbo Joe Bloggsian
@ 2012-05-18 21:25 ` Jesse Barnes
  2012-05-22 16:14   ` Joe Bloggsian
  0 siblings, 1 reply; 4+ messages in thread
From: Jesse Barnes @ 2012-05-18 21:25 UTC (permalink / raw)
  To: Joe Bloggsian; +Cc: intel-gfx

On Thu, 17 May 2012 21:11:45 +0100
Joe Bloggsian <joebloggsian@gmail.com> wrote:

> Hi,
> 
> We are looking at accelerating video operations using 
> vaapi/intel-driver. When using Ivy bridge we believe that the GPU is 
> (almost always) not turboing even when 100% busy doing vaapi video 
> things (e.g. image scaling on EUs or bitstream decode). To determined 
> this we use cat /sys/kernel/debug/dri/0/i915_cur_delayinfo and GPU top 
> (todays IVB fixed vesion). We have tried a variety of IVB parts from 
> 3610QE up to 3770 - all do the same. We've mainly been using kernel 
> 3.2.0-24-generic and libdrm 2.4.32. The same machines turbo correctly 
> when doing equivent things in windows using intel media SDK.
> 
> I get the impression from mailing lists that turbo is known to have 
> driver/sw issues. Can anyone suggest if there is a later kernel/drm 
> version that might improve things? If so where do we find it? This is 
> for evaluation so we're happy to try unstable latest software.

You could try the drm-intel-next branch from Daniel's git tree at
git://people.freedesktop.org/~danvet/drm-intel.

I've definitely seen turbo kick in for gfx workloads, but parts of the
media engine use a different turbo mechanism, so if the current kernel
bits don't work, you could try this:

--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -2439,7 +2439,7 @@ void gen6_enable_rps(struct drm_i915_private *dev_priv)
        I915_WRITE(GEN6_RP_IDLE_HYSTERSIS, 10);
        I915_WRITE(GEN6_RP_CONTROL,
                   GEN6_RP_MEDIA_TURBO |
-                  GEN6_RP_MEDIA_HW_MODE |
+                  GEN6_RP_MEDIA_HW_NORMAL_MODE |
                   GEN6_RP_MEDIA_IS_GFX |
                   GEN6_RP_ENABLE |
                   GEN6_RP_UP_BUSY_AVG |

If that doesn't work, let me know and I'll see what we're missing.

Thanks,
-- 
Jesse Barnes, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: IVB GPU turbo
  2012-05-18 21:25 ` Jesse Barnes
@ 2012-05-22 16:14   ` Joe Bloggsian
  2012-05-22 16:23     ` Jesse Barnes
  0 siblings, 1 reply; 4+ messages in thread
From: Joe Bloggsian @ 2012-05-22 16:14 UTC (permalink / raw)
  To: Jesse Barnes, intel-gfx


[-- Attachment #1.1: Type: text/plain, Size: 3718 bytes --]

On 18 May 2012 22:25, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:

> On Thu, 17 May 2012 21:11:45 +0100
> Joe Bloggsian <joebloggsian@gmail.com> wrote:
>
> > Hi,
> >
> > We are looking at accelerating video operations using
> > vaapi/intel-driver. When using Ivy bridge we believe that the GPU is
> > (almost always) not turboing even when 100% busy doing vaapi video
> > things (e.g. image scaling on EUs or bitstream decode). To determined
> > this we use cat /sys/kernel/debug/dri/0/i915_cur_delayinfo and GPU top
> > (todays IVB fixed vesion). We have tried a variety of IVB parts from
> > 3610QE up to 3770 - all do the same. We've mainly been using kernel
> > 3.2.0-24-generic and libdrm 2.4.32. The same machines turbo correctly
> > when doing equivent things in windows using intel media SDK.
> >
> > I get the impression from mailing lists that turbo is known to have
> > driver/sw issues. Can anyone suggest if there is a later kernel/drm
> > version that might improve things? If so where do we find it? This is
> > for evaluation so we're happy to try unstable latest software.
>
> You could try the drm-intel-next branch from Daniel's git tree at
> git://people.freedesktop.org/~danvet/drm-intel.
>
> I've definitely seen turbo kick in for gfx workloads, but parts of the
> media engine use a different turbo mechanism, so if the current kernel
> bits don't work, you could try this:
>
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -2439,7 +2439,7 @@ void gen6_enable_rps(struct drm_i915_private
> *dev_priv)
>        I915_WRITE(GEN6_RP_IDLE_HYSTERSIS, 10);
>        I915_WRITE(GEN6_RP_CONTROL,
>                   GEN6_RP_MEDIA_TURBO |
> -                  GEN6_RP_MEDIA_HW_MODE |
> +                  GEN6_RP_MEDIA_HW_NORMAL_MODE |
>                   GEN6_RP_MEDIA_IS_GFX |
>                   GEN6_RP_ENABLE |
>                   GEN6_RP_UP_BUSY_AVG |
>
> If that doesn't work, let me know and I'll see what we're missing.
>
> Thanks,
> --
> Jesse Barnes, Intel Open Source Technology Center
>

Hi Jesse,

Thanks for the help, I've had time to build and test a few kernels on
various systems following your advice.

In summary I need both a new drm-intel-next kernel from Daniel's tree *and*
the patch you suggest to get expected GPU turbo behaviour, compared to a
stable 3.2 kernel.

Test results from Core i7 3770 / HD4000: With just the latest drm-intel-next
kernel (commit 98b6bd), the symptoms are as before, max GPU turbo of 600MHz
in the test app. With just the (equivalent of the) patch applied to a
3.2.18 kernel, the max turbo is better (>600) but still often less than
expected. With both patch and kernel, the GPU immediately spins up to
1.15GHz and stays there, as expected - and the measured test app
performance is nearly twice what I get with the up to date Ubuntu 12.04 x64
kernel!

I've also seen the full turbo kick in for other media workloads with the
default kernel, but one way of reliably reproducing this problem for me is
to run the avcenc test app that is part of libva.

The same problem exists on Sandy Bridge. Although the turbo and performance
gaps between the latest released Ubuntu 12.04 kernel and the patched 3.4
kernel are less than Ivy Bridge, they are still significant on my core i3
2310M / HD3000 laptop.

I'm happy that things are good enough for our purposes now - but please do
let me know if there's anything else I can do to help with this.

Thanks,
Bloggsian.
PS. It's great to see Intel putting this work into the open source drivers
- even without the turbo patches, the latest 3.4 drm-intel-next kernel
still gives something like a 5% performance boost over the current Ubuntu
kernel in my quick tests on Ivy.

[-- Attachment #1.2: Type: text/html, Size: 5794 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: IVB GPU turbo
  2012-05-22 16:14   ` Joe Bloggsian
@ 2012-05-22 16:23     ` Jesse Barnes
  0 siblings, 0 replies; 4+ messages in thread
From: Jesse Barnes @ 2012-05-22 16:23 UTC (permalink / raw)
  To: Joe Bloggsian; +Cc: intel-gfx

On Tue, 22 May 2012 17:14:11 +0100
Joe Bloggsian <joebloggsian@gmail.com> wrote:
> Thanks for the help, I've had time to build and test a few kernels on
> various systems following your advice.
> 
> In summary I need both a new drm-intel-next kernel from Daniel's tree *and*
> the patch you suggest to get expected GPU turbo behaviour, compared to a
> stable 3.2 kernel.
> 
> Test results from Core i7 3770 / HD4000: With just the latest drm-intel-next
> kernel (commit 98b6bd), the symptoms are as before, max GPU turbo of 600MHz
> in the test app. With just the (equivalent of the) patch applied to a
> 3.2.18 kernel, the max turbo is better (>600) but still often less than
> expected. With both patch and kernel, the GPU immediately spins up to
> 1.15GHz and stays there, as expected - and the measured test app
> performance is nearly twice what I get with the up to date Ubuntu 12.04 x64
> kernel!

Awesome, thanks so much for testing, I'll send the patch upstream now.

> I've also seen the full turbo kick in for other media workloads with the
> default kernel, but one way of reliably reproducing this problem for me is
> to run the avcenc test app that is part of libva.
> 
> The same problem exists on Sandy Bridge. Although the turbo and performance
> gaps between the latest released Ubuntu 12.04 kernel and the patched 3.4
> kernel are less than Ivy Bridge, they are still significant on my core i3
> 2310M / HD3000 laptop.

Ok good to know; the patch will apply to SNB too, the fact you tested
things there makes my life easier. :)

-- 
Jesse Barnes, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-05-22 16:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-17 20:11 IVB GPU turbo Joe Bloggsian
2012-05-18 21:25 ` Jesse Barnes
2012-05-22 16:14   ` Joe Bloggsian
2012-05-22 16:23     ` Jesse Barnes

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.