drm/i915: Shrink the GEM kmem_caches upon idling
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 24 Jan 2018 11:36:08 +0000 (11:36 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 24 Jan 2018 15:28:37 +0000 (15:28 +0000)
commit84a1074920523430f9dc30ff907f4801b4820072
treef3171060ab43deb99c1cbde256a66a7b7465a917
parent6f56103d7e95f96568a460493ff6c0ced45f538b
drm/i915: Shrink the GEM kmem_caches upon idling

When we finally decide the gpu is idle, that is a good time to shrink
our kmem_caches.

v3: Defer until an rcu grace period after we idle.
v4: Think about epoch wraparound and how likely that is.
v5: Use I915_EPOCH_INVALID magic.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180124113608.14909-2-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem.c