Re: [RFC PATCH 0/3] Expose gpu counters via perf pmu driver

2014-11-16 Thread Ingo Molnar
* Robert Bragg wrote: > > I'd strong[ly] suggest thinking about sampling as well, if > > the hardware exposes sample information: at least for > > profiling CPU loads the difference is like day and night, > > compared to aggregated counts and self-profiling. > > Here I was thinking of

Re: [RFC PATCH 0/3] Expose gpu counters via perf pmu driver

2014-11-16 Thread Ingo Molnar
* Robert Bragg rob...@sixbynine.org wrote: I'd strong[ly] suggest thinking about sampling as well, if the hardware exposes sample information: at least for profiling CPU loads the difference is like day and night, compared to aggregated counts and self-profiling. Here I was

Re: [RFC PATCH 0/3] Expose gpu counters via perf pmu driver

2014-11-12 Thread Robert Bragg
On Mon, Nov 10, 2014 at 11:13 AM, Ingo Molnar wrote: > > * Robert Bragg wrote: > >> On Haswell there are 8 different report layouts that basically trade >> off how many counters to include from 13 to 61 32bit counters plus 1 >> 64bit timestamp. I exposed this format choice in the event >>

Re: [RFC PATCH 0/3] Expose gpu counters via perf pmu driver

2014-11-12 Thread Robert Bragg
On Mon, Nov 10, 2014 at 11:13 AM, Ingo Molnar mi...@kernel.org wrote: * Robert Bragg rob...@sixbynine.org wrote: snip On Haswell there are 8 different report layouts that basically trade off how many counters to include from 13 to 61 32bit counters plus 1 64bit timestamp. I exposed this

Re: [RFC PATCH 0/3] Expose gpu counters via perf pmu driver

2014-11-10 Thread Ingo Molnar
* Robert Bragg wrote: > On Wed, Nov 5, 2014 at 12:33 PM, Peter Zijlstra wrote: > > On Mon, Nov 03, 2014 at 09:47:17PM +, Robert Bragg wrote: > > > >> > And do I take it right that if you're able/allowed/etc.. to open/have > >> > the fd to the GPU/DRM/DRI whatever context you have the right

Re: [RFC PATCH 0/3] Expose gpu counters via perf pmu driver

2014-11-10 Thread Ingo Molnar
* Robert Bragg rob...@sixbynine.org wrote: On Wed, Nov 5, 2014 at 12:33 PM, Peter Zijlstra pet...@infradead.org wrote: On Mon, Nov 03, 2014 at 09:47:17PM +, Robert Bragg wrote: And do I take it right that if you're able/allowed/etc.. to open/have the fd to the GPU/DRM/DRI whatever

Re: [RFC PATCH 0/3] Expose gpu counters via perf pmu driver

2014-11-05 Thread Robert Bragg
On Wed, Nov 5, 2014 at 12:33 PM, Peter Zijlstra wrote: > On Mon, Nov 03, 2014 at 09:47:17PM +, Robert Bragg wrote: > >> > And do I take it right that if you're able/allowed/etc.. to open/have >> > the fd to the GPU/DRM/DRI whatever context you have the right >> > credentials to also observe

Re: [RFC PATCH 0/3] Expose gpu counters via perf pmu driver

2014-11-05 Thread Peter Zijlstra
On Mon, Nov 03, 2014 at 09:47:17PM +, Robert Bragg wrote: > > And do I take it right that if you're able/allowed/etc.. to open/have > > the fd to the GPU/DRM/DRI whatever context you have the right > > credentials to also observe these counters? > > Right and in particular since we want to

Re: [RFC PATCH 0/3] Expose gpu counters via perf pmu driver

2014-11-05 Thread Peter Zijlstra
On Mon, Nov 03, 2014 at 09:47:17PM +, Robert Bragg wrote: And do I take it right that if you're able/allowed/etc.. to open/have the fd to the GPU/DRM/DRI whatever context you have the right credentials to also observe these counters? Right and in particular since we want to allow

Re: [RFC PATCH 0/3] Expose gpu counters via perf pmu driver

2014-11-05 Thread Robert Bragg
On Wed, Nov 5, 2014 at 12:33 PM, Peter Zijlstra pet...@infradead.org wrote: On Mon, Nov 03, 2014 at 09:47:17PM +, Robert Bragg wrote: And do I take it right that if you're able/allowed/etc.. to open/have the fd to the GPU/DRM/DRI whatever context you have the right credentials to also

Re: [RFC PATCH 0/3] Expose gpu counters via perf pmu driver

2014-11-03 Thread Robert Bragg
On Thu, Oct 30, 2014 at 7:08 PM, Peter Zijlstra wrote: > On Wed, Oct 22, 2014 at 04:28:48PM +0100, Robert Bragg wrote: >> Our desired permission model seems consistent with perf's current model >> whereby you would need privileges if you want to profile across all gpu >> contexts but not need

Re: [RFC PATCH 0/3] Expose gpu counters via perf pmu driver

2014-11-03 Thread Robert Bragg
On Thu, Oct 30, 2014 at 7:08 PM, Peter Zijlstra pet...@infradead.org wrote: On Wed, Oct 22, 2014 at 04:28:48PM +0100, Robert Bragg wrote: Our desired permission model seems consistent with perf's current model whereby you would need privileges if you want to profile across all gpu contexts but

Re: [RFC PATCH 0/3] Expose gpu counters via perf pmu driver

2014-10-30 Thread Peter Zijlstra
On Wed, Oct 22, 2014 at 04:28:48PM +0100, Robert Bragg wrote: > Our desired permission model seems consistent with perf's current model > whereby you would need privileges if you want to profile across all gpu > contexts but not need special permissions to profile your own context. > > The

Re: [RFC PATCH 0/3] Expose gpu counters via perf pmu driver

2014-10-30 Thread Peter Zijlstra
On Wed, Oct 22, 2014 at 04:28:48PM +0100, Robert Bragg wrote: Our desired permission model seems consistent with perf's current model whereby you would need privileges if you want to profile across all gpu contexts but not need special permissions to profile your own context. The awkward

Re: [RFC PATCH 0/3] Expose gpu counters via perf pmu driver

2014-10-24 Thread Robert Bragg
On Thu, Oct 23, 2014 at 6:58 AM, Ingo Molnar wrote: > > * Robert Bragg wrote: > >> [...] >> >> I'd be interested to hear whether is sounds reasonable to >> others for us to expose gpu device metrics via a perf pmu and >> whether adding the PERF_PMU_CAP_IS_DEVICE flag as in my >> following patch

Re: [RFC PATCH 0/3] Expose gpu counters via perf pmu driver

2014-10-24 Thread Robert Bragg
On Thu, Oct 23, 2014 at 6:58 AM, Ingo Molnar mi...@kernel.org wrote: * Robert Bragg rob...@sixbynine.org wrote: [...] I'd be interested to hear whether is sounds reasonable to others for us to expose gpu device metrics via a perf pmu and whether adding the PERF_PMU_CAP_IS_DEVICE flag as in

Re: [RFC PATCH 0/3] Expose gpu counters via perf pmu driver

2014-10-22 Thread Ingo Molnar
* Robert Bragg wrote: > [...] > > I'd be interested to hear whether is sounds reasonable to > others for us to expose gpu device metrics via a perf pmu and > whether adding the PERF_PMU_CAP_IS_DEVICE flag as in my > following patch could be acceptable. I think it's perfectly reasonable,

[RFC PATCH 0/3] Expose gpu counters via perf pmu driver

2014-10-22 Thread Robert Bragg
Although I haven't seen any precedent for drivers using perf pmus to expose device metrics, I've been experimenting with exposing some of the performance counters of Intel Gen graphics hardware recently and looking to see if it makes sense to build on the perf infrastructure for our use cases.

Re: [RFC PATCH 0/3] Expose gpu counters via perf pmu driver

2014-10-22 Thread Ingo Molnar
* Robert Bragg rob...@sixbynine.org wrote: [...] I'd be interested to hear whether is sounds reasonable to others for us to expose gpu device metrics via a perf pmu and whether adding the PERF_PMU_CAP_IS_DEVICE flag as in my following patch could be acceptable. I think it's perfectly

[RFC PATCH 0/3] Expose gpu counters via perf pmu driver

2014-10-22 Thread Robert Bragg
Although I haven't seen any precedent for drivers using perf pmus to expose device metrics, I've been experimenting with exposing some of the performance counters of Intel Gen graphics hardware recently and looking to see if it makes sense to build on the perf infrastructure for our use cases.