[Intel-gfx] [PATCH 1/3] RFM drm/i915: Boost RPS frequency for CPU stalls

Jesse Barnes jbarnes at virtuousgeek.org
Thu Aug 22 17:12:14 CEST 2013


Mengmeng and/or Ouping, can you collect full power & perf numbers of
this patchset compared to the current mainline without these patches
applied?  Just running our existing set of benchmarks and tests would
be a good start.

Thanks,
Jesse

On Thu, 22 Aug 2013 03:40:56 +0100
Chris Wilson <chris at chris-wilson.co.uk> wrote:

> If we encounter a situation where the CPU blocks waiting for results
> from the GPU, give the GPU a kick to boost its the frequency.
> 
> This should work to reduce user interface stalls and to quickly promote
> mesa to high frequencies - but the cost is that our requested frequency
> stalls high (as we do not idle for long enough before rc6 to start
> reducing frequencies, nor are we aggressive at down clocking an
> underused GPU). However, this should be mitigated by rc6 itself powering
> off the GPU when idle, and that energy use is dependent upon the workload
> of the GPU in addition to its frequency (e.g. the math or sampler
> functions only consume power when used). Still, this is likely to
> adversely affect light workloads.
> 
> Stéphane raised the concern that this will punish good applications and
> reward bad applications - but due to the nature of how mesa performs its
> client throttling, I believe all mesa applications will be roughly
> equally affected.
> 
> RFM - request for measurement!
> 
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Kenneth Graunke <kenneth at whitecape.org>
> Cc: Stéphane Marchesin <stephane.marchesin at gmail.com>
> Cc: "Meng, Mengmeng" <mengmeng.meng at intel.com>
> Cc: "Zhuang, Lena" <lena.zhuang at intel.com>
> ---
>  drivers/gpu/drm/i915/i915_gem.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 091bb553..8ef3559 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -1106,6 +1106,15 @@ static int __wait_seqno(struct intel_ring_buffer *ring, u32 seqno,
>  	if (WARN_ON(!ring->irq_get(ring)))
>  		return -ENODEV;
>  
> +	if (dev_priv->info->gen >= 6) {
> +		mutex_lock(&dev_priv->rps.hw_lock);
> +		if (dev_priv->info->is_valleyview)
> +			valleyview_set_rps(dev_priv->dev, dev_priv->rps.max_delay);
> +		else
> +			gen6_set_rps(dev_priv->dev, dev_priv->rps.max_delay);
> +		mutex_unlock(&dev_priv->rps.hw_lock);
> +	}
> +
>  	/* Record current time in case interrupted by signal, or wedged * */
>  	getrawmonotonic(&before);
>  


-- 
Jesse Barnes, Intel Open Source Technology Center



More information about the Intel-gfx mailing list