[Intel-gfx] [RFC 04/10] drm/i915: Expose a PMU interface for perf queries

Peter Zijlstra peterz at infradead.org
Wed Aug 23 18:04:29 UTC 2017


On Wed, Aug 23, 2017 at 05:51:38PM +0000, Rogozhkin, Dmitry V wrote:

> > The above command tries to add an event 'i915/rcs0-busy/' to a task. How
> > are i915 resource associated to any one particular task?
> 
> Currently in no way, they are global.

Right. So no per DRM context things. Can you have multiple DRM contexts
per task? If so that would make things slightly tricky when you get away
from !global counters.

> > Is there a unique i915 resource for each task? If not, I don't see how
> > per-task event can ever work as expected.
> 
> This depends on what you mean under "expected"? I see 2 variants:
> 1. Either this command line should return correct metric values
> 2. This command line should error out

> Right now i915 PMU produces global metric, thus, I think 2nd variant is
> true. Which I think is achievable if PMU is registered with
> perf_invalid_context.

Agreed, and yes, perf_invalid_context is right for uncore stuff and will
result in refusal to create per-task counters.


More information about the Intel-gfx mailing list