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

2017-10-02 Thread Rogozhkin, Dmitry V
@lists.freedesktop.org Subject: Re: [Intel-gfx] [RFC 04/10] drm/i915: Expose a PMU interface for perf queries On Tue, 2017-08-29 at 21:21 +0200, Peter Zijlstra wrote: > On Tue, Aug 29, 2017 at 07:16:31PM +, Rogozhkin, Dmitry V wrote: > > > Pretty strict, people tend to get fairly upset every

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

2017-09-20 Thread Rogozhkin, Dmitry V
-gfx] [RFC 04/10] drm/i915: Expose a PMU interface for perf queries On Tue, 2017-08-29 at 21:21 +0200, Peter Zijlstra wrote: > On Tue, Aug 29, 2017 at 07:16:31PM +, Rogozhkin, Dmitry V wrote: > > > Pretty strict, people tend to get fairly upset every time we leak stuff. > >

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

2017-09-13 Thread Rogozhkin, Dmitry V
On Tue, 2017-08-29 at 21:21 +0200, Peter Zijlstra wrote: > On Tue, Aug 29, 2017 at 07:16:31PM +, Rogozhkin, Dmitry V wrote: > > > Pretty strict, people tend to get fairly upset every time we leak stuff. > > > In fact Debian and Android carry a perf_event_paranoid patch that > > > default disabl

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

2017-08-29 Thread Peter Zijlstra
On Tue, Aug 29, 2017 at 07:16:31PM +, Rogozhkin, Dmitry V wrote: > > Pretty strict, people tend to get fairly upset every time we leak stuff. > > In fact Debian and Android carry a perf_event_paranoid patch that > > default disables _everything_ :-( > > Can you say more on that for Debian and

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

2017-08-29 Thread Rogozhkin, Dmitry V
On Tue, 2017-08-29 at 11:30 +0200, Peter Zijlstra wrote: > On Mon, Aug 28, 2017 at 10:43:17PM +, Rogozhkin, Dmitry V wrote: > > > Hi Peter, > > > > I have updated my fixes to Tvrtko's PMU, they are here: > > https://patchwork.freedesktop.org/series/28842/, and I started to check > > whether we

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

2017-08-29 Thread Peter Zijlstra
On Mon, Aug 28, 2017 at 10:43:17PM +, Rogozhkin, Dmitry V wrote: > Hi Peter, > > I have updated my fixes to Tvrtko's PMU, they are here: > https://patchwork.freedesktop.org/series/28842/, and I started to check > whether we will be able to cover all the use cases for this PMU which we > had in

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

2017-08-28 Thread Rogozhkin, Dmitry V
On Wed, 2017-08-23 at 20:22 +0200, Peter Zijlstra wrote: > On Wed, Aug 23, 2017 at 05:51:38PM +, Rogozhkin, Dmitry V wrote: > > > Anyhow, returning to the metrics i915 exposes. Some metrics are just > > exposure of some counters supported already inside i915 PMU which do not > > require any sp

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

2017-08-23 Thread Peter Zijlstra
On Wed, Aug 23, 2017 at 07:00:33PM +, Rogozhkin, Dmitry V wrote: > On Wed, 2017-08-23 at 20:22 +0200, Peter Zijlstra wrote: > > On Wed, Aug 23, 2017 at 05:51:38PM +, Rogozhkin, Dmitry V wrote: > > > > > Anyhow, returning to the metrics i915 exposes. Some metrics are just > > > exposure of

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

2017-08-23 Thread Peter Zijlstra
On Wed, Aug 23, 2017 at 06:38:05PM +, Rogozhkin, Dmitry V wrote: > On Wed, 2017-08-23 at 20:04 +0200, Peter Zijlstra wrote: > > On Wed, Aug 23, 2017 at 05:51:38PM +, Rogozhkin, Dmitry V wrote: > > > > > > The above command tries to add an event 'i915/rcs0-busy/' to a task. How > > > > are

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

2017-08-23 Thread Rogozhkin, Dmitry V
On Wed, 2017-08-23 at 20:22 +0200, Peter Zijlstra wrote: > On Wed, Aug 23, 2017 at 05:51:38PM +, Rogozhkin, Dmitry V wrote: > > > Anyhow, returning to the metrics i915 exposes. Some metrics are just > > exposure of some counters supported already inside i915 PMU which do not > > require any sp

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

2017-08-23 Thread Rogozhkin, Dmitry V
On Wed, 2017-08-23 at 20:01 +0200, Peter Zijlstra wrote: > On Wed, Aug 23, 2017 at 05:51:38PM +, Rogozhkin, Dmitry V wrote: > > > https://patchwork.freedesktop.org/patch/171953/. This patch makes 'perf > > stat -e i915/rcs0-busy/' to error out and supports 'perf stat -e > > i915/rcs0-busy/ -a

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

2017-08-23 Thread Rogozhkin, Dmitry V
On Wed, 2017-08-23 at 20:04 +0200, Peter Zijlstra wrote: > On Wed, Aug 23, 2017 at 05:51:38PM +, 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 w

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

2017-08-23 Thread Peter Zijlstra
On Wed, Aug 23, 2017 at 05:51:38PM +, Rogozhkin, Dmitry V wrote: > Anyhow, returning to the metrics i915 exposes. Some metrics are just > exposure of some counters supported already inside i915 PMU which do not > require any special sampling: at any given moment you can request the > counter v

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

2017-08-23 Thread Peter Zijlstra
On Wed, Aug 23, 2017 at 05:51:38PM +, Rogozhkin, Dmitry V wrote: > And there is another problem associated with the "perf stat -e > -a": since 8 events are initialized, I get metric values multiplied by > 8. How I am supposed to fix that? I suspect that this is somehow related > to cpumask att

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

2017-08-23 Thread Peter Zijlstra
On Wed, Aug 23, 2017 at 05:51:38PM +, 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 ha

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

2017-08-23 Thread Peter Zijlstra
On Wed, Aug 23, 2017 at 05:51:38PM +, Rogozhkin, Dmitry V wrote: > https://patchwork.freedesktop.org/patch/171953/. This patch makes 'perf > stat -e i915/rcs0-busy/' to error out and supports 'perf stat -e > i915/rcs0-busy/ -a -C0'. I still think I miss something since 'perf stat > -e i915/rcs

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

2017-08-23 Thread Rogozhkin, Dmitry V
On Tue, 2017-08-22 at 20:17 +0200, Peter Zijlstra wrote: > On Sat, Aug 12, 2017 at 02:15:13AM +, Rogozhkin, Dmitry V wrote: > > $ perf stat -e instructions,i915/rcs0-busy/ workload.sh > > <... wrokload.sh output...> > > > > Performance counter stats for 'workload.sh': > > 1,204,616,268

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

2017-08-22 Thread Peter Zijlstra
On Sat, Aug 12, 2017 at 02:15:13AM +, Rogozhkin, Dmitry V wrote: > $ perf stat -e instructions,i915/rcs0-busy/ workload.sh > <... wrokload.sh output...> > > Performance counter stats for 'workload.sh': > 1,204,616,268 instructions > 0 i915/rcs0-busy/ > >

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

2017-08-02 Thread Tvrtko Ursulin
Hi Peter, We are trying to expose some software PMU events from the i915 driver. Things like GPU engine busyness, power usage and similar. There is quite a bit of opens regarding usage of the perf API and so on. Would you be able to snoop around the below patch and help with answering some

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

2017-08-02 Thread Tvrtko Ursulin
From: Chris Wilson The first goal is to be able to measure GPU (and invidual ring) busyness without having to poll registers from userspace. (Which not only incurs holding the forcewake lock indefinitely, perturbing the system, but also runs the risk of hanging the machine.) As an alternative we