[Intel-gfx] [PATCH] drm/i915: Unbind objects in shrinker only if device is runtime active
Chris Wilson
chris at chris-wilson.co.uk
Wed Mar 30 10:20:31 UTC 2016
On Wed, Mar 30, 2016 at 01:11:53PM +0300, Mika Kuoppala wrote:
> From: Praveen Paneri <praveen.paneri at intel.com>
>
> When the system is running low on memory, gem shrinker is invoked.
> In this process objects will be unbounded from GTT and unbinding process
> will require access to GTT(GTTADR) and also to fence register potentially.
> That requires a resume of gfx device, if suspended, in the shrinker path.
> Considering the power leakage due to intermediate resume, perform unbinding
> operation only if device is already runtime active.
>
> v2: Using newly implemented intel_runtime_pm_get_if_in_use()
>
> Signed-off-by: Akash Goel <akash.goel at intel.com>
> Signed-off-by: Praveen Paneri <praveen.paneri at intel.com>
> Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
> ---
> drivers/gpu/drm/i915/i915_gem_shrinker.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_shrinker.c b/drivers/gpu/drm/i915/i915_gem_shrinker.c
> index d3c473ffb90a..3bc292d626ff 100644
> --- a/drivers/gpu/drm/i915/i915_gem_shrinker.c
> +++ b/drivers/gpu/drm/i915/i915_gem_shrinker.c
> @@ -129,6 +129,15 @@ i915_gem_shrink(struct drm_i915_private *dev_priv,
> i915_gem_retire_requests(dev_priv->dev);
>
> /*
> + * Unbinding of objects will require HW access; Let us not wake the
> + * device just to recover a little memory. If absolutely necessary,
> + * we will force the wake during oom-notifier.
> + */
The implication was that we would send the companion patch as well!
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list