Re: [Intel-gfx] [PATCH v3 2/4] drm/i915/pmu: Use kstat_irqs to get interrupt count

2020-12-10 Thread Tvrtko Ursulin
On 10/12/2020 17:44, Thomas Gleixner wrote: On Thu, Dec 10 2020 at 17:09, Tvrtko Ursulin wrote: On 10/12/2020 16:35, Thomas Gleixner wrote: I'll send out a series addressing irq_to_desc() (ab)use all over the place shortly. i915 is in there... Yep we don't need atomic, my bad. And we would

Re: [Intel-gfx] [PATCH v3 2/4] drm/i915/pmu: Use kstat_irqs to get interrupt count

2020-12-10 Thread Thomas Gleixner
On Thu, Dec 10 2020 at 17:09, Tvrtko Ursulin wrote: > On 10/12/2020 16:35, Thomas Gleixner wrote: >> I'll send out a series addressing irq_to_desc() (ab)use all over the >> place shortly. i915 is in there... > > Yep we don't need atomic, my bad. And we would care about the shared > interrupt

Re: [Intel-gfx] [PATCH v3 2/4] drm/i915/pmu: Use kstat_irqs to get interrupt count

2020-12-10 Thread Tvrtko Ursulin
On 10/12/2020 16:35, Thomas Gleixner wrote: On Thu, Dec 10 2020 at 10:45, Tvrtko Ursulin wrote: On 10/12/2020 07:53, Joonas Lahtinen wrote: I think later in the thread there was a suggestion to replace this with simple counter increment in IRQ handler. It was indeed unsafe until recent

Re: [Intel-gfx] [PATCH v3 2/4] drm/i915/pmu: Use kstat_irqs to get interrupt count

2020-12-10 Thread Thomas Gleixner
On Thu, Dec 10 2020 at 10:45, Tvrtko Ursulin wrote: > On 10/12/2020 07:53, Joonas Lahtinen wrote: >> I think later in the thread there was a suggestion to replace this with >> simple counter increment in IRQ handler. > > It was indeed unsafe until recent b00bccb3f0bb ("drm/i915/pmu: Handle > PCI

Re: [Intel-gfx] [PATCH v3 2/4] drm/i915/pmu: Use kstat_irqs to get interrupt count

2020-12-10 Thread Tvrtko Ursulin
On 10/12/2020 07:53, Joonas Lahtinen wrote: + Tvrtko and Chris for comments Code seems to be added in: commit 0cd4684d6ea9a4ffec33fc19de4dd667bb90d0a5 Author: Tvrtko Ursulin Date: Tue Nov 21 18:18:50 2017 + drm/i915/pmu: Add interrupt count metric I think later in the thread

Re: [Intel-gfx] [PATCH v3 2/4] drm/i915/pmu: Use kstat_irqs to get interrupt count

2020-12-09 Thread Joonas Lahtinen
+ Tvrtko and Chris for comments Code seems to be added in: commit 0cd4684d6ea9a4ffec33fc19de4dd667bb90d0a5 Author: Tvrtko Ursulin Date: Tue Nov 21 18:18:50 2017 + drm/i915/pmu: Add interrupt count metric I think later in the thread there was a suggestion to replace this with simple

Re: [PATCH v3 2/4] drm/i915/pmu: Use kstat_irqs to get interrupt count

2020-12-08 Thread Jarkko Sakkinen
On Sun, Dec 06, 2020 at 10:33:09PM +0100, Thomas Gleixner wrote: > On Sun, Dec 06 2020 at 17:38, Thomas Gleixner wrote: > > On Fri, Dec 04 2020 at 18:43, Jerry Snitselaar wrote: > >> Now that kstat_irqs is exported, get rid of count_interrupts in > >> i915_pmu.c > > > > May I ask why this has been

Re: [PATCH v3 2/4] drm/i915/pmu: Use kstat_irqs to get interrupt count

2020-12-06 Thread Thomas Gleixner
On Sun, Dec 06 2020 at 14:47, Jerry Snitselaar wrote: > Thomas Gleixner @ 2020-12-06 09:38 MST: > > I don't know the history behind this bit. I stumbled across it in cscope > when looking for places using kstat_irqs. I'm not ranting at you. The i915 people are on Cc.

Re: [PATCH v3 2/4] drm/i915/pmu: Use kstat_irqs to get interrupt count

2020-12-06 Thread Jerry Snitselaar
Thomas Gleixner @ 2020-12-06 09:38 MST: > On Fri, Dec 04 2020 at 18:43, Jerry Snitselaar wrote: > >> Now that kstat_irqs is exported, get rid of count_interrupts in >> i915_pmu.c >> --- a/drivers/gpu/drm/i915/i915_pmu.c >> +++ b/drivers/gpu/drm/i915/i915_pmu.c >> @@ -423,22 +423,6 @@ static

Re: [PATCH v3 2/4] drm/i915/pmu: Use kstat_irqs to get interrupt count

2020-12-06 Thread Thomas Gleixner
On Sun, Dec 06 2020 at 17:38, Thomas Gleixner wrote: > On Fri, Dec 04 2020 at 18:43, Jerry Snitselaar wrote: >> Now that kstat_irqs is exported, get rid of count_interrupts in >> i915_pmu.c > > May I ask why this has been merged in the first place? > > Nothing in a driver has ever to fiddle with

Re: [PATCH v3 2/4] drm/i915/pmu: Use kstat_irqs to get interrupt count

2020-12-06 Thread Thomas Gleixner
On Fri, Dec 04 2020 at 18:43, Jerry Snitselaar wrote: > Now that kstat_irqs is exported, get rid of count_interrupts in > i915_pmu.c > --- a/drivers/gpu/drm/i915/i915_pmu.c > +++ b/drivers/gpu/drm/i915/i915_pmu.c > @@ -423,22 +423,6 @@ static enum hrtimer_restart i915_sample(struct hrtimer >

[PATCH v3 2/4] drm/i915/pmu: Use kstat_irqs to get interrupt count

2020-12-04 Thread Jerry Snitselaar
Now that kstat_irqs is exported, get rid of count_interrupts in i915_pmu.c Cc: Thomas Gleixner Cc: Jani Nikula Cc: Rodrigo Vivi Cc: David Airlie Cc: Daniel Vetter Cc: intel-...@lists.freedesktop.org Cc: dri-de...@lists.freedesktop.org Cc: Jarkko Sakkinen Cc: Jason Gunthorpe Cc: Peter