[Intel-gfx] [PATCH v2] drm/i915/bdw: BDW Software Turbo

Sun, Daisy daisy.sun at intel.com
Sat Jul 26 02:47:11 CEST 2014


we have reconsidered good suggestions and evaluated performance and complexity again.

Timer Constant callback would continuously wake up CPU and entire
package, results in lower CPU and package C-state and shorter battery life,
especially for standby time.

execbuf is a good one, and we had taken it into account too. execbuf
can happen much more frequent than flips. Synchronization and calculation
overhead were the main reasons that we tried to avoid using too much IA
resource to benefit GT.

Here's is a revised version of software turbo for BDW, please take a
look and see if there's any concern.

For software turbo, it can be tough to find out a perfect solution
, may need some trade-off.

Revised design:
GT busyness will still be calculated when page_flip comes in, then GT frequency
will be adjusted accordingly. This point stays the same as previous design.
For the cases no flip will happen(server or background task with no display activity)
which is a previous concern,  set GT frequency to RP0(no turbo algorithm interfered in this
case).

Implementation details:
1)  Driver start with RP0 as GT frequency.
2)  When the flip comes, do the regular software turbo busyness calculation. Also set a timer with 250ms;  
3)  If the flip keep coming in time, keep turbo algorithm, reset timer;
4)  When the timer is fired, set RP frequency to RP0 so that the background task will still be taken
care of(the RPS boost and idle need to be disabled in this situation).
5)If the flip comes again, go to 2).

To recap,
For most common cases, GT will run at a desired frequency as a
result of software turbo algorithm;
For background workloads or no flip environment, GT will be running at RP0 with
shorter execution time to extend RC6 and pkg C state residency as long as power
is concerned.

I'll start with the implementation if all concerns are ironed out.

- Daisy


On 7/25/2014 12:22 AM, Daniel Vetter wrote:
> On Thu, Jul 24, 2014 at 01:28:21PM -0700, Jesse Barnes wrote:
>> If that won't work, you could just use a timer, or tie into some other
>> event that happens when the GPU is busy (e.g. execbuf or retire) instead
>> of trying to tie into the display side of things.
> Yes, tying into a normal timer is probably best. At least I get the
> impression that we only need something regular. Of course once the gpu is
> idle we need to stop rearming that timer and restart it upon first batch
> when transitioning out of idle.
> -Daniel
>
>> Jesse
>>
>> On Tue, 15 Jul 2014 06:35:20 +0000
>> "Sun, Daisy" <daisy.sun at intel.com> wrote:
>>
>>> Hi Daniel, Chris
>>>
>>> The concern for traditional X and media server do make sense. I'll update the patch with RP_UP_EI_INTERRUPT as trigger instead of the page flip.
>>> Thanks for the valuable input.
>>>
>>> - Daisy
>>>
>>> -----Original Message-----
>>> From: daniel.vetter at ffwll.ch [mailto:daniel.vetter at ffwll.ch] On Behalf Of Daniel Vetter
>>> Sent: Monday, July 14, 2014 12:04 AM
>>> To: Sun, Daisy
>>> Cc: Chris Wilson; intel-gfx at lists.freedesktop.org
>>> Subject: Re: [Intel-gfx] [PATCH v2] drm/i915/bdw: BDW Software Turbo
>>>
>>> On Mon, Jul 14, 2014 at 8:59 AM, Daniel Vetter <daniel at ffwll.ch> wrote:
>>>> On Mon, Jul 14, 2014 at 04:22:44AM +0000, Sun, Daisy wrote:
>>>>> 3) The function will be called when flip happened, this should cover
>>>>> most of the cases. One exception is background media process without
>>>>> any display output, it's relatively rare.  Please let me know if you
>>>>> have concern on other cases, I will try to cover it definitely.
>>>> Traditional X never flips. And we kinda have to keep this working.
>>>> Instead of checking when flipping we need to check at regular time
>>>> intervals I guess, for as long as the gt is busy.
>>> Oh and transcode servers are a real thing apparently. They also never flip, and we actually care from a business pov ...
>>> -Daniel
>>> --
>>> Daniel Vetter
>>> Software Engineer, Intel Corporation
>>> +41 (0) 79 365 57 48 - http://blog.ffwll.ch
>>> _______________________________________________
>>> Intel-gfx mailing list
>>> Intel-gfx at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>>>
>>
>> -- 
>> Jesse Barnes, Intel Open Source Technology Center

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20140725/3efe37d8/attachment.html>


More information about the Intel-gfx mailing list