Skip to contentSkip to conversation

question on FSL_EMB perf

DISCUSSION Peter Zijlstra 3 participants 7 messages Jun 10, 2015 – Jun 11, 2015

lore
Share & tools
lore
#0 lore raw

Hi Mike, Ben,

I just noticed:

arch/powerpc/Kconfig: select HAVE_PERF_EVENTS_NMI if PPC64

But can't ppc32 have FSL_EMB perf?

#1 lore raw
Quoted 7 lines · Peter Zijlstra

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

#2 lore raw
Quoted 11 lines · Scott Wood
Quoted 7 lines · Peter Zijlstra

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();
#3 lore raw
Quoted 8 lines · Peter Zijlstra
Quoted 7 lines · Scott Wood
Quoted 6 lines · Peter Zijlstra

Hi Mike, Ben,

I just noticed:

arch/powerpc/Kconfig: select HAVE_PERF_EVENTS_NMI if PPC64

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

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.

Quoted 2 lines

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?

Quoted 3 lines
# 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

#4 lore raw
Quoted 3 lines · Scott Wood

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.

Quoted 5 lines
Quoted 3 lines
# 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

Quoted 1 line

which only happens on ppc64.

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

#5 lore raw
Quoted 13 lines · Peter Zijlstra
Quoted 4 lines · Scott Wood

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.

Quoted 4 lines
Quoted 3 lines
# git grep nmi_enter arch/powerpc/
arch/powerpc/perf/core-book3s.c:                nmi_enter();
arch/powerpc/perf/core-fsl-emb.c:               nmi_enter();
Quoted 5 lines
Quoted 3 lines

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

#6 lore raw
In reply to Peter Zijlstra
Quoted 5 lines · Peter Zijlstra

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