]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Do interrupible mutex lock first to avoid locking for unreference
authorChris Wilson <chris@chris-wilson.co.uk>
Sun, 17 Oct 2010 08:45:41 +0000 (09:45 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 19 Oct 2010 08:20:23 +0000 (09:20 +0100)
commit2ed06ac23f8b4330c5e84c3139b36ee587ddf639
treef9d8b2536555c3a5af75d461f16d7374af988cf8
parent3956aa841db94106124a44b882638be68db863fb
drm/i915: Do interrupible mutex lock first to avoid locking for unreference

One of the primarily consumers of the i915 driver is X, a large signal
driven application. Frequently when writing into the buffers, there is a
pending signal which causes us not to take the interruptible lock but
then we need to take that same lock around the object unreference. By
rearranging the code to do the interruptible lock as the first check, we
can avoid the frequent additional locking around the unreference.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/i915_gem.c