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

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

 



On Wed, 2017-08-23 at 20:04 +0200, Peter Zijlstra wrote:
> 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.

Just to be sure we are on the same page: under task we understand the
process which is being monitored with the perf: "perf stat -e <ev>
task.sh"? Yes, each process may have few DRM contexts, so we are in a
tricky space:).

If we will decide to support per-task counters in the future, would it
be possible to preserve global mode providing end-user a choice: monitor
per-process or globally?

> 
> > > 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.

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux