Blob Blame History Raw
From 6b6573d114050ee4ee1c54a60a92ae1b68ce1b6e Mon Sep 17 00:00:00 2001
From: Chris Wilson <chris@chris-wilson.co.uk>
Date: Wed, 5 Jul 2017 15:26:33 +0100
Subject: [PATCH] drm/i915: Drop request retirement before reaping stale contexts
Git-commit: 6b6573d114050ee4ee1c54a60a92ae1b68ce1b6e
Patch-mainline: v4.14-rc1
References: FATE#322643 bsc#1055900

Before we create a new context, we try and reap all the stale contexts
(i.e. those that are freed but waiting for a worker to come and return
their allocations to the system). Before we do this, we retire all
requests so that we clear any inflight no longer used contexts (who are
only being kept alived by those inflght requests). However, any context
that is finally unreferenced by this retirement is put onto an RCU list
and not available for immediately reaping, we stall for no immediate
benefit.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170705142634.18554-3-chris@chris-wilson.co.uk
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Acked-by: Takashi Iwai <tiwai@suse.de>

---
 drivers/gpu/drm/i915/i915_gem_context.c |    1 -
 1 file changed, 1 deletion(-)

--- a/drivers/gpu/drm/i915/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/i915_gem_context.c
@@ -384,7 +384,6 @@ i915_gem_create_context(struct drm_i915_
 	lockdep_assert_held(&dev_priv->drm.struct_mutex);
 
 	/* Reap stale contexts */
-	i915_gem_retire_requests(dev_priv);
 	contexts_free(dev_priv);
 
 	ctx = __create_hw_context(dev_priv, file_priv);