Re: [PATCH v7 09/12] drm/i915: add a new perf configuration execbuf parameter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Lionel Landwerlin (2019-07-09 11:59:31)
> On 09/07/2019 12:58, Chris Wilson wrote:
> > Quoting Lionel Landwerlin (2019-07-09 10:32:05)
> >> +static int eb_oa_config(struct i915_execbuffer *eb)
> >> +{
> >> +       int err;
> >> +
> >> +       if (!eb->oa_config)
> >> +               return 0;
> >> +
> >> +       err = i915_active_request_set(&eb->engine->last_oa_config,
> >> +                                     eb->request);
> > This is outside of the eb->request->timeline->mutex and needs a mutex.
> 
> 
> Can I do this inside i915_request_add() when rq->flags & 
> I915_REQUEST_FLAGS_PERF ?

No. Because it is still being accessed without the appropriate locks.
(Multiple callers trying to modify eb->engine->last_oa_config all using
their own timeline->mutex.) You already need a lock to serialise
oa_config, that seems adequate to cover last_oa_config as well.

Oh, don't call the flag _PERF but something like FLAGS_NOPREEMPT so
it indicates the mechanism. Come to think of this don't include _FLAGS_
as we don't need to disambiguate yet :)
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux