Re: [Intel-gfx] [PATCH v2 4/5] drm/i915: Spin for struct_mutex inside shrinker

2017-06-13 Thread Joonas Lahtinen
On pe, 2017-06-09 at 12:03 +0100, Chris Wilson wrote: > Having resolved whether or not we would deadlock upon a call to > mutex_lock(>struct_mutex), we can then spin for the contended > struct_mutex if we are not the owner. We cannot afford to simply block > and wait for the mutex, as the owner

[Intel-gfx] [PATCH v2 4/5] drm/i915: Spin for struct_mutex inside shrinker

2017-06-09 Thread Chris Wilson
Having resolved whether or not we would deadlock upon a call to mutex_lock(>struct_mutex), we can then spin for the contended struct_mutex if we are not the owner. We cannot afford to simply block and wait for the mutex, as the owner may itself be waiting for the allocator -- i.e. a cyclic