[Intel-gfx] [PATCH] drm/i915: Do not sync RCU during shrinking

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Fri May 5 09:40:09 UTC 2017


Due to the complex dependencies between workqueues and RCU, which
are not easily detected by lockdep, do not synchronize RCU during
shrinking. RCU sync gains us very little benefit in real life
scenarios where the amount of memory used by object backing
storage is dominant over the metadata under RCU.

Suggested-by: Chris Wilson <chris at chris-wilson.co.uk>
Signed-off-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Cc: J. R. Okajima <hooanon05g at gmail.com>
Cc: Andrea Arcangeli <aarcange at redhat.com>
---
 drivers/gpu/drm/i915/i915_gem_shrinker.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_shrinker.c b/drivers/gpu/drm/i915/i915_gem_shrinker.c
index 0e7352d..e1868ed 100644
--- a/drivers/gpu/drm/i915/i915_gem_shrinker.c
+++ b/drivers/gpu/drm/i915/i915_gem_shrinker.c
@@ -59,9 +59,6 @@ static void shrinker_unlock(struct drm_i915_private *dev_priv, bool unlock)
 		return;
 
 	mutex_unlock(&dev_priv->drm.struct_mutex);
-
-	/* expedite the RCU grace period to free some request slabs */
-	synchronize_rcu_expedited();
 }
 
 static bool any_vma_pinned(struct drm_i915_gem_object *obj)
-- 
2.7.4



More information about the Intel-gfx mailing list