Skip to content

RFC rewriting SLB miss handler in C

Nicholas Piggin linuxppc-dev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest5 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5powerpc/64s/hash: convert SLB miss handlers to Carch/powerpc/include/asm/asm-prototypes.h arch/powerpc/kernel/exceptions-64s.S arch/powerpc/mm/Makefile +2 more+166 -6134 replies
2/5powerpc/64s/hash: remove user SLB data from the pacaarch/powerpc/include/asm/book3s/64/mmu-hash.h arch/powerpc/include/asm/paca.h arch/powerpc/kernel/asm-offsets.c +5 more+40 -1020 replies
3/5powerpc/64s/hash: remove the first vmalloc segment from the bolted SLBarch/powerpc/include/asm/book3s/64/mmu-hash.h arch/powerpc/mm/slb.c+5 -130 replies
4/5powerpc/64s/hash: Add SLB allocation bitmapsarch/powerpc/include/asm/paca.h arch/powerpc/mm/slb.c arch/powerpc/xmon/xmon.c+35 -150 replies
5/5powerpc/64s/hash: Add a SLB preload cachearch/powerpc/include/asm/thread_info.h arch/powerpc/kernel/process.c arch/powerpc/mm/mmu_context_book3s64.c +1 more+102 -250 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/5] rewriting SLB miss handler in C

I'd like to rewrite the SLB miss handlers in C for maintainability and ability to more easily extend the code.

I have not benchmarked it yet but obviously setting up the stack and going to C code rather than carefully hand optimised assembly is likely to slow down SLB misses by a reasonable amount. So I've started looked at a few basic optimisations we can make to justify this change. There is still more that can be done, but SLB misses have been reduced significantly, and with more tuning and optimization I think we could bring it down quite a bit more.

I'm trying to get the first patch solid, and it is the big change so would really appreciate review and commets on that. Other patches are not quite polished but comments would still be welcome on those (keep in mind they are obviously not all polished).

Thanks,
Nick

Nicholas Piggin (5):
powerpc/64s/hash: convert SLB miss handlers to C powerpc/64s/hash: remove user SLB data from the paca powerpc/64s/hash: remove the first vmalloc segment from the bolted SLB powerpc/64s/hash: Add SLB allocation bitmaps powerpc/64s/hash: Add a SLB preload cache

 arch/powerpc/include/asm/asm-prototypes.h     |   2 +
 arch/powerpc/include/asm/book3s/64/mmu-hash.h |   3 +-
 arch/powerpc/include/asm/paca.h               |  19 +-
 arch/powerpc/include/asm/thread_info.h        |   4 +
 arch/powerpc/kernel/asm-offsets.c             |   9 -
 arch/powerpc/kernel/exceptions-64s.S          | 200 ++-------
 arch/powerpc/kernel/paca.c                    |  21 -
 arch/powerpc/kernel/process.c                 |   6 +
 arch/powerpc/mm/Makefile                      |   2 +-
 arch/powerpc/mm/hash_utils_64.c               |  46 +--
 arch/powerpc/mm/mmu_context.c                 |   3 +-
 arch/powerpc/mm/mmu_context_book3s64.c        |  10 +-
 arch/powerpc/mm/slb.c                         | 382 +++++++++++-------
 arch/powerpc/mm/slb_low.S                     | 338 ----------------
 arch/powerpc/mm/slice.c                       |  29 +-
 arch/powerpc/xmon/xmon.c                      |   2 +-
 16 files changed, 328 insertions(+), 748 deletions(-)
 delete mode 100644 arch/powerpc/mm/slb_low.S
Signature · 1 line
2.17.0