Skip to content

use runtime constant to optimize handle_arch_irq access

Jisheng Zhang linux-arch linux-arm-kernel linux-csky linux-riscv lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 17 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3vmlinux.lds.h: add _handle_arch_irq RUNTIME_CONST sectioninclude/asm-generic/vmlinux.lds.h+2 -11 reply
2/3genirq: use runtime constant to optimize handle_arch_irq accessinclude/linux/irq.h kernel/irq/handle.c+8 -47 replies
3/3arm64: use runtime constant to optimize handle_arch_irq accessarch/arm64/kernel/entry-common.c arch/arm64/kernel/irq.c+9 -49 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchGuo Ren (Alibaba Damo Academy)
1/3
2/3R-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] use runtime constant to optimize handle_arch_irq access

Currently, on GENERIC_IRQ_MULTI_HANDLER or arm64 platforms, the handle_arch_irq is a pointer which is set during booting, and every irq processing needs to access it, so it sits in hot code path. We can use the runtime constant mechanism which was introduced by Linus to speed up its accessing.

Tested on Sipeed Lichee Pi 4A (riscv64) board, the perf sched benchmark is improved by ~5.8%

Tested on Quad CA55 platform, the perf sched benchmark is improved by ~6.5%

As for the GENERIC_IRQ_MULTI_HANDLER platforms but without runtime const support, such as arm, csky, loongarch, microblaze and openrisc, there should be no changes.

Jisheng Zhang (3):
vmlinux.lds.h: add _handle_arch_irq RUNTIME_CONST section
genirq: use runtime constant to optimize handle_arch_irq access
arm64: use runtime constant to optimize handle_arch_irq access

 arch/arm64/kernel/entry-common.c  | 4 +++-
 arch/arm64/kernel/irq.c           | 9 ++++++---
 include/asm-generic/vmlinux.lds.h | 3 ++-
 include/linux/irq.h               | 4 +++-
 kernel/irq/handle.c               | 8 +++++---
 5 files changed, 19 insertions(+), 9 deletions(-)
Signature · 1 line
2.51.0