public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] use runtime constant to optimize handle_arch_irq access
@ 2026-02-20  9:09 Jisheng Zhang
  2026-02-20  9:09 ` [PATCH 1/3] vmlinux.lds.h: add _handle_arch_irq RUNTIME_CONST section Jisheng Zhang
                   ` (2 more replies)
  0 siblings, 3 replies; 21+ messages in thread
From: Jisheng Zhang @ 2026-02-20  9:09 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon, Arnd Bergmann, Thomas Gleixner,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
	Guo Ren
  Cc: linux-arm-kernel, linux-kernel, linux-arch, linux-riscv,
	linux-csky

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(-)

-- 
2.51.0


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2026-02-25 14:58 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-20  9:09 [PATCH 0/3] use runtime constant to optimize handle_arch_irq access Jisheng Zhang
2026-02-20  9:09 ` [PATCH 1/3] vmlinux.lds.h: add _handle_arch_irq RUNTIME_CONST section Jisheng Zhang
2026-02-24  2:01   ` Guo Ren
2026-02-20  9:09 ` [PATCH 2/3] genirq: use runtime constant to optimize handle_arch_irq access Jisheng Zhang
2026-02-22 22:06   ` Thomas Gleixner
2026-02-23 12:41     ` Jisheng Zhang
2026-02-23 13:11       ` Mark Rutland
2026-02-23 13:22         ` Jisheng Zhang
2026-02-23 13:55           ` Mark Rutland
2026-02-24  1:40   ` Guo Ren
2026-02-24  1:59     ` Guo Ren
2026-02-20  9:09 ` [PATCH 3/3] arm64: " Jisheng Zhang
2026-02-20 12:34   ` Leo Yan
2026-02-20 13:16     ` Jisheng Zhang
2026-02-20 13:34       ` Jisheng Zhang
2026-02-20 16:47         ` Leo Yan
2026-02-21  0:14           ` Jisheng Zhang
2026-02-23  9:15             ` Leo Yan
2026-02-25 14:40               ` Jisheng Zhang
2026-02-23 12:56   ` Mark Rutland
2026-02-23 12:58     ` Jisheng Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox