]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/shrinker: Wait before acquiring struct_mutex under oom
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 5 Aug 2016 09:14:13 +0000 (10:14 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 5 Aug 2016 09:54:38 +0000 (10:54 +0100)
commit92d6feecf59cd06fc3a1e2c5ce0bcb5d142eceee
tree24a6fdb77bee71ee8f5999ea847a516dfe520d0f
parentbda8896258cc9e42bdd1d0cf6d7abd56641d0ed1
drm/i915/shrinker: Wait before acquiring struct_mutex under oom

We can now wait for the GPU (all engines) to become idle without
requiring the struct_mutex. Inside the shrinker, we need to currently
take the struct_mutex in order to purge objects and to purge the objects
we need the GPU to be idle - causing a stall whilst we hold the
struct_mutex. We can hide most of that stall by performing the wait
before taking the struct_mutex and only doing essential waits for
new rendering on objects to be freed.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1470388464-28458-8-git-send-email-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem_shrinker.c