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

Daniel Vetter daniel at ffwll.ch
Mon Jul 28 11:17:37 CEST 2014


On Fri, Jul 25, 2014 at 05:47:11PM -0700, Sun, Daisy wrote:
> 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.

If you shut down the timer when idle this shouldn't be a concern at all.
See the idle infrastructure we have and e.g. the retire work handler. We
could even put the software turbo into the retire work handler ...

> 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.

Yeah, running it at each execbuf is going to be too expensive. But with
the regular timer there should be no need to also do this in flips - it
might badly interfere with the missed-flip boosting patches from Chris
even.

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

Doesn't seem to be attached.

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

Well, but we've made already quite some nice improvments with the boosting
logic. So I think it can be done, but I agree it's not easy.

> 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.

Ah, I expected a patch ;-) Usually code diffs are much more efficient
communication as a replacement for when you'd use a whiteboard session
with a colocated team. It doesn't need to run nor even compile, just
speudo-code illustrating the main integration points.

Anyway, see above for my comments: No need to integrate with flips if we
do the timer thing correctly.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch



More information about the Intel-gfx mailing list