]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Use mutex_lock_killable() from inside the shrinker
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 9 Jan 2019 16:42:03 +0000 (16:42 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 10 Jan 2019 13:44:08 +0000 (13:44 +0000)
commitbe451403b1d6f7e0c59af5f58dd8a9e5978c7867
tree6d40cfc0d5ef2d079463793cd18bc160f356b7ea
parentc67a81b31b296104fa1132cb1d2f30c3e2c071f9
drm/i915: Use mutex_lock_killable() from inside the shrinker

If the current process is being killed (it was interrupted with SIGKILL
or equivalent), it will not make any progress in page allocation and we
can abort performing the shrinking on its behalf. So we can use
mutex_lock_killable() instead (although this path should only be
reachable from kswapd currently).

Tvrtko pointed out that it should also be reachable from debugfs, which
he would prefer retain its interruptiblity. As a compromise, killable is a
step in the right direction!

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