linux/arch/powerpc
Nicholas Piggin 0faf20a1ad powerpc/64s/interrupt: Don't enable MSR[EE] in irq handlers unless perf is in use
Enabling MSR[EE] in interrupt handlers while interrupts are still soft
masked allows PMIs to profile interrupt handlers to some degree, beyond
what SIAR latching allows.

When perf is not being used, this is almost useless work. It requires an
extra mtmsrd in the irq handler, and it also opens the door to masked
interrupts hitting and requiring replay, which is more expensive than
just taking them directly. This effect can be noticable in high IRQ
workloads.

Avoid enabling MSR[EE] unless perf is currently in use. This saves about
60 cycles (or 8%) on a simple decrementer interrupt microbenchmark.
Replayed interrupts drop from 1.4% of all interrupts taken, to 0.003%.

This does prevent the soft-nmi interrupt being taken in these handlers,
but that's not too reliable anyway. The SMP watchdog will continue to be
the reliable way to catch lockups.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210922145452.352571-5-npiggin@gmail.com
2021-12-16 21:31:45 +11:00
..
boot powerpc: flexible GPR range save/restore macros 2021-11-29 23:15:20 +11:00
configs powerpc/microwatt: add POWER9_CPU, clear PPC_64S_HASH_MMU 2021-12-09 22:41:16 +11:00
crypto powerpc: flexible GPR range save/restore macros 2021-11-29 23:15:20 +11:00
include powerpc/64s/interrupt: Don't enable MSR[EE] in irq handlers unless perf is in use 2021-12-16 21:31:45 +11:00
kernel powerpc/64s/interrupt: Don't enable MSR[EE] in irq handlers unless perf is in use 2021-12-16 21:31:45 +11:00
kexec powerpc/64s: Move hash MMU support code under CONFIG_PPC_64S_HASH_MMU 2021-12-09 22:41:13 +11:00
kvm Merge branch 'topic/ppc-kvm' into next 2021-12-15 11:29:53 +11:00
lib powerpc/inst: Define ppc_inst_t 2021-12-09 22:41:21 +11:00
math-emu powerpc/64s: avoid reloading (H)SRR registers if they are still valid 2021-06-25 00:06:55 +10:00
mm powerpc/inst: Optimise copy_inst_from_kernel_nofault() 2021-12-09 22:41:21 +11:00
net bpf ppc32: Access only if addr is kernel address 2021-11-25 11:25:32 +11:00
perf powerpc/64s/perf: add power_pmu_wants_prompt_pmi to say whether perf wants PMIs to be soft-NMI 2021-12-16 21:31:45 +11:00
platforms powerpc/pseries/vas: Don't print an error when VAS is unavailable 2021-12-16 21:31:45 +11:00
purgatory powerpc/kexec: Don't use .machine ppc64 in trampoline_64.S 2021-04-08 21:17:43 +10:00
sysdev powerpc/xive: Fix compile when !CONFIG_PPC_POWERNV. 2021-12-02 10:40:38 +11:00
tools powerpc/head_check: Fix shellcheck errors 2021-08-17 22:52:02 +10:00
xmon powerpc/inst: Define ppc_inst_t 2021-12-09 22:41:21 +11:00
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kconfig powerpc/64s: Move hash MMU support code under CONFIG_PPC_64S_HASH_MMU 2021-12-09 22:41:13 +11:00
Kconfig.debug powerpc/ptdump: Convert powerpc to GENERIC_PTDUMP 2021-08-25 13:35:48 +10:00
Makefile Kbuild updates for v5.16 2021-11-08 09:15:45 -08:00
Makefile.postlink powerpc: unrel_branch_check.sh: use nm to find symbol value 2020-09-02 11:00:22 +10:00