Re: [Intel-gfx] [PATCH 2/3] drm/i915: Priority boost for locked waits

2017-01-23 Thread Tvrtko Ursulin
On 23/01/2017 11:50, Chris Wilson wrote: On Mon, Jan 23, 2017 at 11:41:03AM +, Tvrtko Ursulin wrote: On 23/01/2017 10:51, Chris Wilson wrote: On Mon, Jan 23, 2017 at 10:43:10AM +, Tvrtko Ursulin wrote: @@ -3285,6 +3291,7 @@ int i915_gem_object_set_cache_level(struct

Re: [Intel-gfx] [PATCH 2/3] drm/i915: Priority boost for locked waits

2017-01-23 Thread Chris Wilson
On Mon, Jan 23, 2017 at 11:41:03AM +, Tvrtko Ursulin wrote: > > On 23/01/2017 10:51, Chris Wilson wrote: > >On Mon, Jan 23, 2017 at 10:43:10AM +, Tvrtko Ursulin wrote: > >>>@@ -3285,6 +3291,7 @@ int i915_gem_object_set_cache_level(struct > >>>drm_i915_gem_object *obj, > >>> ret

Re: [Intel-gfx] [PATCH 2/3] drm/i915: Priority boost for locked waits

2017-01-23 Thread Tvrtko Ursulin
On 23/01/2017 10:51, Chris Wilson wrote: On Mon, Jan 23, 2017 at 10:43:10AM +, Tvrtko Ursulin wrote: @@ -3285,6 +3291,7 @@ int i915_gem_object_set_cache_level(struct drm_i915_gem_object *obj, ret = i915_gem_object_wait(obj,

Re: [Intel-gfx] [PATCH 2/3] drm/i915: Priority boost for locked waits

2017-01-23 Thread Chris Wilson
On Mon, Jan 23, 2017 at 10:43:10AM +, Tvrtko Ursulin wrote: > >@@ -3285,6 +3291,7 @@ int i915_gem_object_set_cache_level(struct > >drm_i915_gem_object *obj, > > ret = i915_gem_object_wait(obj, > >I915_WAIT_INTERRUPTIBLE | > >

Re: [Intel-gfx] [PATCH 2/3] drm/i915: Priority boost for locked waits

2017-01-23 Thread Tvrtko Ursulin
On 21/01/2017 09:25, Chris Wilson wrote: We always try to do an unlocked wait before resorting to having a blocking wait under the mutex - so we very rarely have to sleep under the struct_mutex. However, when we do we want that wait to be as short as possible as the struct_mutex is our BKL that

Re: [Intel-gfx] [PATCH 2/3] drm/i915: Priority boost for locked waits

2017-01-23 Thread Joonas Lahtinen
On la, 2017-01-21 at 09:25 +, Chris Wilson wrote: > We always try to do an unlocked wait before resorting to having a > blocking wait under the mutex - so we very rarely have to sleep under > the struct_mutex. However, when we do we want that wait to be as short > as possible as the

[Intel-gfx] [PATCH 2/3] drm/i915: Priority boost for locked waits

2017-01-21 Thread Chris Wilson
We always try to do an unlocked wait before resorting to having a blocking wait under the mutex - so we very rarely have to sleep under the struct_mutex. However, when we do we want that wait to be as short as possible as the struct_mutex is our BKL that will stall the driver and all clients.