mbox series

[v3,0/6] powerpc/64s: interrupt speedups

Message ID 20210922145452.352571-1-npiggin@gmail.com (mailing list archive)
Headers show
Series powerpc/64s: interrupt speedups | expand

Message

Nicholas Piggin Sept. 22, 2021, 2:54 p.m. UTC
Here's a few stragglers. The first patch was submitted already but had
some bugs with unrecoverable exceptions on HPT (current->blah being
accessed before MSR[RI] was enabled). Those should be fixed now.

The others are generally for helping asynch interrupts, which are a bit
harder to measure well but important for IO and IPIs.

After this series, the SPR accesses of the interrupt handlers for radix
are becoming pretty optimal except for PPR which we could improve on,
and virt CPU accounting which is very costly -- we might disable that
by default unless someone comes up with a good reason to keep it.

Since v1:
- Compile fixes for 64e.
- Fixed a SOFT_MASK_DEBUG false positive.
- Improve function name and comments explaining why patch 2 does not
  need to hard enable when PMU is enabled via sysfs.

Since v2:
- Split first patch into patch 1 and 2, improve on the changelogs.
- More compile fixes.
- Fixed several review comments from Daniel.
- Added patch 5.

Thanks,
Nick

Nicholas Piggin (6):
  powerpc/64/interrupt: make normal synchronous interrupts enable
    MSR[EE] if possible
  powerpc/64s/interrupt: handle MSR EE and RI in interrupt entry wrapper
  powerpc/64s/perf: add power_pmu_wants_prompt_pmi to say whether perf
    wants PMIs to be soft-NMI
  powerpc/64s/interrupt: Don't enable MSR[EE] in irq handlers unless
    perf is in use
  powerpc/64/interrupt: reduce expensive debug tests
  powerpc/64s/interrupt: avoid saving CFAR in some asynchronous
    interrupts

 arch/powerpc/include/asm/hw_irq.h    |  59 +++++++++++++---
 arch/powerpc/include/asm/interrupt.h |  58 ++++++++++++---
 arch/powerpc/kernel/dbell.c          |   3 +-
 arch/powerpc/kernel/exceptions-64s.S | 101 ++++++++++++++++++---------
 arch/powerpc/kernel/fpu.S            |   5 ++
 arch/powerpc/kernel/irq.c            |   3 +-
 arch/powerpc/kernel/time.c           |  31 ++++----
 arch/powerpc/kernel/vector.S         |  10 +++
 arch/powerpc/perf/core-book3s.c      |  31 ++++++++
 9 files changed, 232 insertions(+), 69 deletions(-)

Comments

Michael Ellerman Dec. 21, 2021, 12:14 p.m. UTC | #1
On Thu, 23 Sep 2021 00:54:46 +1000, Nicholas Piggin wrote:
> Here's a few stragglers. The first patch was submitted already but had
> some bugs with unrecoverable exceptions on HPT (current->blah being
> accessed before MSR[RI] was enabled). Those should be fixed now.
> 
> The others are generally for helping asynch interrupts, which are a bit
> harder to measure well but important for IO and IPIs.
> 
> [...]

Applied to powerpc/next.

[1/6] powerpc/64/interrupt: make normal synchronous interrupts enable MSR[EE] if possible
      https://git.kernel.org/powerpc/c/4423eb5ae32ec613af3fceee2fe84234e417ee55
[2/6] powerpc/64s/interrupt: handle MSR EE and RI in interrupt entry wrapper
      https://git.kernel.org/powerpc/c/ff0b0d6e1a7bc202241a9b1e28d1da4b744e0312
[3/6] powerpc/64s/perf: add power_pmu_wants_prompt_pmi to say whether perf wants PMIs to be soft-NMI
      https://git.kernel.org/powerpc/c/5a7745b96f43c69f9b4875bcf516a0341acbc3fb
[4/6] powerpc/64s/interrupt: Don't enable MSR[EE] in irq handlers unless perf is in use
      https://git.kernel.org/powerpc/c/0faf20a1ad1647c0fc0f5a367c71e5e84deaf899
[5/6] powerpc/64/interrupt: reduce expensive debug tests
      https://git.kernel.org/powerpc/c/ecb1057c0f9a0f3f052294de6cc2eb43ecf7547b
[6/6] powerpc/64s/interrupt: avoid saving CFAR in some asynchronous interrupts
      https://git.kernel.org/powerpc/c/af47d79b041deccc31e0dddc6310a654c13d04b6

cheers