[Intel-gfx] [PATCH 7/9] drm/i915/perf: Allow dynamic reconfiguration of the OA stream

Chris Wilson chris at chris-wilson.co.uk
Thu Oct 10 15:44:42 UTC 2019


Quoting Lionel Landwerlin (2019-10-10 16:22:25)
> On 10/10/2019 00:19, Chris Wilson wrote:
> > From: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
> >
> > Introduce a new perf_ioctl command to change the OA configuration of the
> > active stream. This allows the OA stream to be reconfigured between
> > batch buffers, giving greater flexibility in sampling. We inject a
> > request into the OA context to reconfigure the stream asynchronously on
> > the GPU in between and ordered with execbuffer calls.
> >
> > Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
> 
> 
> So much simpler :)

Indeed, it all came together into a much more coherent story.

> > ---
> >   /**
> >    * i915_perf_ioctl - support ioctl() usage with i915 perf stream FDs
> >    * @stream: An i915 perf stream
> > @@ -2879,6 +2901,8 @@ static long i915_perf_ioctl_locked(struct i915_perf_stream *stream,
> >       case I915_PERF_IOCTL_DISABLE:
> >               i915_perf_disable_locked(stream);
> >               return 0;
> > +     case I915_PERF_IOCTL_CONFIG:
> > +             return i915_perf_config_locked(stream, arg);
> 
> For REMOVE_CONFIG we passed a pointer to an u64, not sure whether we 
> should reuse the same pattern here?

Aiui, the user creates oa-config handles, and/or queries them. If we are
simpler talking handles that fit inside unsigned long (so assume u32)
then I don't see the harm in passing an id rather than a pointer.

The alternative is this takes an uuid string? Or you want to always use
u64 handles?

I guess you will have a better idea what works better after playing
around with userspace.
-Chris


More information about the Intel-gfx mailing list