Re: [Intel-gfx] [PATCH 11/16] drm/i915: Remove (struct_mutex) locking for busy-ioctl

2016-08-05 Thread Joonas Lahtinen
On pe, 2016-08-05 at 08:34 +0100, Chris Wilson wrote: > On Fri, Aug 05, 2016 at 10:05:38AM +0300, Joonas Lahtinen wrote: > > > > On ma, 2016-08-01 at 19:22 +0100, Chris Wilson wrote: > > > > > > By applying the same logic as for wait-ioctl, we can query whether a > > > request has completed

Re: [Intel-gfx] [PATCH 11/16] drm/i915: Remove (struct_mutex) locking for busy-ioctl

2016-08-05 Thread Chris Wilson
On Fri, Aug 05, 2016 at 10:05:38AM +0300, Joonas Lahtinen wrote: > On ma, 2016-08-01 at 19:22 +0100, Chris Wilson wrote: > > By applying the same logic as for wait-ioctl, we can query whether a > > request has completed without holding struct_mutex. The biggest impact > > system-wide is removing

Re: [Intel-gfx] [PATCH 11/16] drm/i915: Remove (struct_mutex) locking for busy-ioctl

2016-08-05 Thread Joonas Lahtinen
On ma, 2016-08-01 at 19:22 +0100, Chris Wilson wrote: > By applying the same logic as for wait-ioctl, we can query whether a > request has completed without holding struct_mutex. The biggest impact > system-wide is removing the flush_active and the contention that causes. > > Testcase:

Re: [Intel-gfx] [PATCH 11/16] drm/i915: Remove (struct_mutex) locking for busy-ioctl

2016-08-04 Thread Chris Wilson
On Thu, Aug 04, 2016 at 01:25:08PM +0300, Joonas Lahtinen wrote: > On ma, 2016-08-01 at 19:22 +0100, Chris Wilson wrote: > > +static __always_inline unsigned > > +__busy_read_flag(const struct drm_i915_gem_request *request) > > +{ > > + return 0x1 << request->engine->exec_id; > > Duh, this

Re: [Intel-gfx] [PATCH 11/16] drm/i915: Remove (struct_mutex) locking for busy-ioctl

2016-08-04 Thread Joonas Lahtinen
On ma, 2016-08-01 at 19:22 +0100, Chris Wilson wrote: > +static __always_inline unsigned > +__busy_read_flag(const struct drm_i915_gem_request *request) > +{ > + return 0x1 << request->engine->exec_id; Duh, this really is our ABI? No BIT(NUM_ENGINES) or something sane? Make a comment of

[Intel-gfx] [PATCH 11/16] drm/i915: Remove (struct_mutex) locking for busy-ioctl

2016-08-01 Thread Chris Wilson
By applying the same logic as for wait-ioctl, we can query whether a request has completed without holding struct_mutex. The biggest impact system-wide is removing the flush_active and the contention that causes. Testcase: igt/gem_busy Signed-off-by: Chris Wilson Cc: