linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* question on FSL_EMB perf
@ 2015-06-10 11:41 Peter Zijlstra
  2015-06-10 19:17 ` Scott Wood
  2015-06-11  6:00 ` Michael Ellerman
  0 siblings, 2 replies; 7+ messages in thread
From: Peter Zijlstra @ 2015-06-10 11:41 UTC (permalink / raw)
  To: Michael Neuling, Benjamin Herrenschmidt; +Cc: linuxppc-dev

Hi Mike, Ben,

I just noticed:

arch/powerpc/Kconfig:   select HAVE_PERF_EVENTS_NMI if PPC64

But can't ppc32 have FSL_EMB perf?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: question on FSL_EMB perf
  2015-06-10 11:41 question on FSL_EMB perf Peter Zijlstra
@ 2015-06-10 19:17 ` Scott Wood
  2015-06-10 19:27   ` Peter Zijlstra
  2015-06-11  6:00 ` Michael Ellerman
  1 sibling, 1 reply; 7+ messages in thread
From: Scott Wood @ 2015-06-10 19:17 UTC (permalink / raw)
  To: Peter Zijlstra; +Cc: Michael Neuling, Benjamin Herrenschmidt, linuxppc-dev

On Wed, 2015-06-10 at 13:41 +0200, Peter Zijlstra wrote:
> Hi Mike, Ben,
> 
> I just noticed:
> 
> arch/powerpc/Kconfig:   select HAVE_PERF_EVENTS_NMI if PPC64
> 
> But can't ppc32 have FSL_EMB perf?

Yes, but it doesn't use NMIs.  ppc64 has lazy interrupt disabling 
which functions as a pseudo-NMI.

-Scott

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: question on FSL_EMB perf
  2015-06-10 19:17 ` Scott Wood
@ 2015-06-10 19:27   ` Peter Zijlstra
  2015-06-10 20:13     ` Scott Wood
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Zijlstra @ 2015-06-10 19:27 UTC (permalink / raw)
  To: Scott Wood; +Cc: Michael Neuling, Benjamin Herrenschmidt, linuxppc-dev

On Wed, 2015-06-10 at 14:17 -0500, Scott Wood wrote:
> On Wed, 2015-06-10 at 13:41 +0200, Peter Zijlstra wrote:
> > Hi Mike, Ben,
> >=20
> > I just noticed:
> >=20
> > arch/powerpc/Kconfig:   select HAVE_PERF_EVENTS_NMI if PPC64
> >=20
> > But can't ppc32 have FSL_EMB perf?
>=20
> Yes, but it doesn't use NMIs.  ppc64 has lazy interrupt disabling=20
> which functions as a pseudo-NMI.

I know. But you can get the same nesting nonsense as with actual real
NMIs.

And seeing how you select HAVE_PERF_EVENT_NMI for PPC64, I figure you
ought to select it too for whatever fsl-emb is.

# git grep nmi_enter arch/powerpc/
arch/powerpc/perf/core-book3s.c:                nmi_enter();
arch/powerpc/perf/core-fsl-emb.c:               nmi_enter();

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: question on FSL_EMB perf
  2015-06-10 19:27   ` Peter Zijlstra
@ 2015-06-10 20:13     ` Scott Wood
  2015-06-10 21:14       ` Peter Zijlstra
  0 siblings, 1 reply; 7+ messages in thread
From: Scott Wood @ 2015-06-10 20:13 UTC (permalink / raw)
  To: Peter Zijlstra; +Cc: Michael Neuling, Benjamin Herrenschmidt, linuxppc-dev

On Wed, 2015-06-10 at 21:27 +0200, Peter Zijlstra wrote:
> On Wed, 2015-06-10 at 14:17 -0500, Scott Wood wrote:
> > On Wed, 2015-06-10 at 13:41 +0200, Peter Zijlstra wrote:
> > > Hi Mike, Ben,
> > > 
> > > I just noticed:
> > > 
> > > arch/powerpc/Kconfig:   select HAVE_PERF_EVENTS_NMI if PPC64
> > > 
> > > But can't ppc32 have FSL_EMB perf?
> > 
> > Yes, but it doesn't use NMIs.  ppc64 has lazy interrupt disabling 
> > which functions as a pseudo-NMI.
> 
> I know. But you can get the same nesting nonsense as with actual real
> NMIs.

What sort of "nesting nonsense" would we get on ppc32?  I wasn't 
trying to say that the pseudo-NMIs didn't count -- I was pointing out 
that we don't even have that on ppc32.

> And seeing how you select HAVE_PERF_EVENT_NMI for PPC64, I figure you
> ought to select it too for whatever fsl-emb is.

Why?

> # git grep nmi_enter arch/powerpc/
> arch/powerpc/perf/core-book3s.c:                nmi_enter();
> arch/powerpc/perf/core-fsl-emb.c:               nmi_enter();

nmi_enter() only gets called when perf_intr_is_nmi() returns non-zero, 
which only happens on ppc64.

-Scott

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: question on FSL_EMB perf
  2015-06-10 20:13     ` Scott Wood
@ 2015-06-10 21:14       ` Peter Zijlstra
  2015-06-10 21:28         ` Scott Wood
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Zijlstra @ 2015-06-10 21:14 UTC (permalink / raw)
  To: Scott Wood; +Cc: Michael Neuling, Benjamin Herrenschmidt, linuxppc-dev

On Wed, 2015-06-10 at 15:13 -0500, Scott Wood wrote:

> What sort of "nesting nonsense" would we get on ppc32?  I wasn't=20
> trying to say that the pseudo-NMIs didn't count -- I was pointing out=20
> that we don't even have that on ppc32.

Oh, I was not aware ppc32 did not have that.

> > # git grep nmi_enter arch/powerpc/
> > arch/powerpc/perf/core-book3s.c:                nmi_enter();
> > arch/powerpc/perf/core-fsl-emb.c:               nmi_enter();
>=20
> nmi_enter() only gets called when perf_intr_is_nmi() returns non-zero,=
=20
> which only happens on ppc64.

ok, so fsl-emb is ppc32 and ppc64, not confusing at all this stuff.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: question on FSL_EMB perf
  2015-06-10 21:14       ` Peter Zijlstra
@ 2015-06-10 21:28         ` Scott Wood
  0 siblings, 0 replies; 7+ messages in thread
From: Scott Wood @ 2015-06-10 21:28 UTC (permalink / raw)
  To: Peter Zijlstra; +Cc: Michael Neuling, Benjamin Herrenschmidt, linuxppc-dev

On Wed, 2015-06-10 at 23:14 +0200, Peter Zijlstra wrote:
> On Wed, 2015-06-10 at 15:13 -0500, Scott Wood wrote:
> 
> > What sort of "nesting nonsense" would we get on ppc32?  I wasn't 
> > trying to say that the pseudo-NMIs didn't count -- I was pointing 
> > out 
> > that we don't even have that on ppc32.
> 
> Oh, I was not aware ppc32 did not have that.
> 
> > > # git grep nmi_enter arch/powerpc/
> > > arch/powerpc/perf/core-book3s.c:                nmi_enter();
> > > arch/powerpc/perf/core-fsl-emb.c:               nmi_enter();
> > 
> > nmi_enter() only gets called when perf_intr_is_nmi() returns non-
> > zero, 
> > which only happens on ppc64.
> 
> ok, so fsl-emb is ppc32 and ppc64, not confusing at all this stuff.

Both drivers can be used on either 32 or 64 bits.

-Scott

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: question on FSL_EMB perf
  2015-06-10 11:41 question on FSL_EMB perf Peter Zijlstra
  2015-06-10 19:17 ` Scott Wood
@ 2015-06-11  6:00 ` Michael Ellerman
  1 sibling, 0 replies; 7+ messages in thread
From: Michael Ellerman @ 2015-06-11  6:00 UTC (permalink / raw)
  To: Peter Zijlstra; +Cc: Michael Neuling, Benjamin Herrenschmidt, linuxppc-dev

On Wed, 2015-06-10 at 13:41 +0200, Peter Zijlstra wrote:
> Hi Mike, Ben,
> 
> I just noticed:
> 
> arch/powerpc/Kconfig:   select HAVE_PERF_EVENTS_NMI if PPC64

We actually only added that recently, in c54b2bf1b5e9 "powerpc: Add ppc64 hard
lockup detector support".

AFAICS it doesn't actually have anything to do with the NMI behaviour of the
perf interrupt. It controls whether the hardlockup detector is enabled and/or
the oprofile NMI timer.

cheers

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-06-11  6:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-10 11:41 question on FSL_EMB perf Peter Zijlstra
2015-06-10 19:17 ` Scott Wood
2015-06-10 19:27   ` Peter Zijlstra
2015-06-10 20:13     ` Scott Wood
2015-06-10 21:14       ` Peter Zijlstra
2015-06-10 21:28         ` Scott Wood
2015-06-11  6:00 ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).