Re: [Intel-gfx] [PATCH 2/3] drm/i915/userptr: Avoid struct_mutex recursion for mmu_invalidate_range_start

2019-01-15 Thread Chris Wilson
Quoting Tvrtko Ursulin (2019-01-15 11:54:15) > > On 14/01/2019 21:17, Chris Wilson wrote: > > -static int i915_gem_userptr_mn_invalidate_range_start(struct mmu_notifier > > *_mn, > > - const struct mmu_notifier_range *range) > > +static struct mutex

Re: [Intel-gfx] [PATCH 2/3] drm/i915/userptr: Avoid struct_mutex recursion for mmu_invalidate_range_start

2019-01-15 Thread Tvrtko Ursulin
On 14/01/2019 21:17, Chris Wilson wrote: Since commit 93065ac753e4 ("mm, oom: distinguish blockable mode for mmu notifiers") we have been able to report failure from mmu_invalidate_range_start which allows us to use a trylock on the struct_mutex to avoid potential recursion and report -EBUSY

Re: [Intel-gfx] [PATCH 2/3] drm/i915/userptr: Avoid struct_mutex recursion for mmu_invalidate_range_start

2019-01-15 Thread Tvrtko Ursulin
On 15/01/2019 10:00, Chris Wilson wrote: Quoting Tvrtko Ursulin (2019-01-15 09:47:45) On 14/01/2019 21:17, Chris Wilson wrote: Since commit 93065ac753e4 ("mm, oom: distinguish blockable mode for mmu notifiers") we have been able to report failure from mmu_invalidate_range_start which allows

Re: [Intel-gfx] [PATCH 2/3] drm/i915/userptr: Avoid struct_mutex recursion for mmu_invalidate_range_start

2019-01-15 Thread Chris Wilson
Quoting Tvrtko Ursulin (2019-01-15 09:47:45) > > On 14/01/2019 21:17, Chris Wilson wrote: > > Since commit 93065ac753e4 ("mm, oom: distinguish blockable mode for mmu > > notifiers") we have been able to report failure from > > mmu_invalidate_range_start which allows us to use a trylock on the > >

Re: [Intel-gfx] [PATCH 2/3] drm/i915/userptr: Avoid struct_mutex recursion for mmu_invalidate_range_start

2019-01-15 Thread Tvrtko Ursulin
On 14/01/2019 21:17, Chris Wilson wrote: Since commit 93065ac753e4 ("mm, oom: distinguish blockable mode for mmu notifiers") we have been able to report failure from mmu_invalidate_range_start which allows us to use a trylock on the struct_mutex to avoid potential recursion and report -EBUSY

[Intel-gfx] [PATCH 2/3] drm/i915/userptr: Avoid struct_mutex recursion for mmu_invalidate_range_start

2019-01-14 Thread Chris Wilson
Since commit 93065ac753e4 ("mm, oom: distinguish blockable mode for mmu notifiers") we have been able to report failure from mmu_invalidate_range_start which allows us to use a trylock on the struct_mutex to avoid potential recursion and report -EBUSY instead. Furthermore, this allows us to pull