drm/i915: Fix i915_gem_fault()
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 25 Jul 2015 06:23:05 +0000 (08:23 +0200)
committerFrançois Tigeot <ftigeot@wolfpond.org>
Sun, 2 Aug 2015 07:16:16 +0000 (09:16 +0200)
commit25b959703ab6950f477c7a44eeaffbdad76f4f37
tree5a2bca39d8491c137b48cc70bdef8696ad7094ee
parentba55f2f542af67c1331fd80f611891b0a29f57bc
drm/i915: Fix i915_gem_fault()

The retry loop in i915_gem_fault() was very seriously broken for EINTR
or ERETRYSYS (which is also basically EINTR)
It loops with gem mostly left locked, doesn't sleep, so it live locks a
cpu if it ever gets hit

The best solution is to disallow EINTR / ERESTARTSYS entirely.
The implementation is crazy... normal drm locks are allowed to PCATCH
and fail with EINTR.  That's just insane

Stability is better with some hacks added.  I'm unwinding all the locks,
sleeping for one tick, and then retrying.
Horrible hack but so far it works
sys/dev/drm/i915/i915_gem.c