linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/8] Generic IRQ entry/exit support for powerpc
@ 2025-12-14 13:02 Mukesh Kumar Chaurasiya
  2025-12-14 13:02 ` [PATCH v2 1/8] powerpc: rename arch_irq_disabled_regs Mukesh Kumar Chaurasiya
                   ` (7 more replies)
  0 siblings, 8 replies; 37+ messages in thread
From: Mukesh Kumar Chaurasiya @ 2025-12-14 13:02 UTC (permalink / raw)
  To: maddy, mpe, npiggin, christophe.leroy, oleg, kees, luto, wad,
	mchauras, thuth, sshegde, charlie, macro, akpm, ldv, deller,
	ankur.a.arora, segher, tglx, thomas.weissschuh, peterz,
	menglong8.dong, bigeasy, namcao, kan.liang, mingo, atrajeev,
	mark.barnett, linuxppc-dev, linux-kernel
  Cc: Mukesh Kumar Chaurasiya

Adding support for the generic irq entry/exit handling for PowerPC. The
goal is to bring PowerPC in line with other architectures that already
use the common irq entry infrastructure, reducing duplicated code and
making it easier to share future changes in entry/exit paths.

This is slightly tested of ppc64le and ppc32.

The performance benchmarks are below:

perf bench syscall usec/op

| Test            | With Patch | Without Patch | % Change |
| --------------- | ---------- | ------------- | -------- |
| getppid usec/op | 0.207795   | 0.210373      | -1.22%   |
| getpgid usec/op | 0.206282   | 0.211676      | -2.55%   |
| fork usec/op    | 833.986    | 814.809       | +2.35%   |
| execve usec/op  | 360.939    | 365.168       | -1.16%   | 


perf bench syscall ops/sec

| Test            | With Patch | Without Patch | % Change |
| --------------- | ---------- | ------------- | -------- |
| getppid ops/sec | 48,12,433  | 47,53,459     | +1.24%   |
| getpgid ops/sec | 48,47,744  | 47,24,192     | +2.61%   |
| fork ops/sec    | 1,199      | 1,227         | -2.28%   |
| execve ops/sec  | 2,770      | 2,738         | +1.16%   |

IPI latency benchmark

| Metric                  | With Patch       | Without Patch    | % Change |
| ----------------------- | ---------------- | ---------------- | -------- |
| Dry-run (ns)            | 206,675.81       | 206,719.36       | -0.02%   |
| Self-IPI avg (ns)       | 1,939,991.00     | 1,976,116.15     | -1.83%   |
| Self-IPI max (ns)       | 3,533,718.93     | 3,582,650.33     | -1.37%   |
| Normal IPI avg (ns)     | 111,110,034.23   | 110,513,373.51   | +0.54%   |
| Normal IPI max (ns)     | 150,393,442.64   | 149,669,477.89   | +0.48%   |
| Broadcast IPI max (ns)  | 3,978,231,022.96 | 4,359,916,859.46 | -8.73%   |
| Broadcast lock max (ns) | 4,025,425,714.49 | 4,384,956,730.83 | -8.20%   |

Thats very close to performance earlier with arch specific handling.

Tests done:
 - Build and boot on ppc64le pseries.
 - Build and boot on ppc64le powernv8 powernv9 powernv10.
 - Build and boot on ppc32.
 - Performance benchmark done with perf syscall basic on pseries.

Changelog:

V1 -> V2
 - Fix an issue where context tracking was showing warnings for
   incorrect context
V1: https://lore.kernel.org/all/20251102115358.1744304-1-mkchauras@linux.ibm.com/

RFC -> PATCH V1
 - Fix for ppc32 spitting out kuap lock warnings.
 - ppc64le powernv8 crash fix.
 - Review comments incorporated from previous RFC.
RFC https://lore.kernel.org/all/20250908210235.137300-2-mchauras@linux.ibm.com/

Mukesh Kumar Chaurasiya (8):
  powerpc: rename arch_irq_disabled_regs
  powerpc: Prepare to build with generic entry/exit framework
  powerpc: introduce arch_enter_from_user_mode
  powerpc: Introduce syscall exit arch functions
  powerpc: add exit_flags field in pt_regs
  powerpc: Prepare for IRQ entry exit
  powerpc: Enable IRQ generic entry/exit path.
  powerpc: Enable Generic Entry/Exit for syscalls.

 arch/powerpc/Kconfig                    |   2 +
 arch/powerpc/include/asm/entry-common.h | 536 ++++++++++++++++++++++++
 arch/powerpc/include/asm/hw_irq.h       |   4 +-
 arch/powerpc/include/asm/interrupt.h    | 401 +++---------------
 arch/powerpc/include/asm/ptrace.h       |   3 +
 arch/powerpc/include/asm/stacktrace.h   |   6 +
 arch/powerpc/include/asm/syscall.h      |   5 +
 arch/powerpc/include/asm/thread_info.h  |   1 +
 arch/powerpc/include/uapi/asm/ptrace.h  |  14 +-
 arch/powerpc/kernel/asm-offsets.c       |   1 +
 arch/powerpc/kernel/interrupt.c         | 255 ++---------
 arch/powerpc/kernel/ptrace/ptrace.c     | 142 +------
 arch/powerpc/kernel/signal.c            |   8 +
 arch/powerpc/kernel/syscall.c           | 119 +-----
 arch/powerpc/kernel/traps.c             |   2 +-
 arch/powerpc/kernel/watchdog.c          |   2 +-
 arch/powerpc/perf/core-book3s.c         |   2 +-
 17 files changed, 685 insertions(+), 818 deletions(-)
 create mode 100644 arch/powerpc/include/asm/entry-common.h

-- 
2.52.0



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

end of thread, other threads:[~2025-12-19  4:57 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-14 13:02 [PATCH v2 0/8] Generic IRQ entry/exit support for powerpc Mukesh Kumar Chaurasiya
2025-12-14 13:02 ` [PATCH v2 1/8] powerpc: rename arch_irq_disabled_regs Mukesh Kumar Chaurasiya
2025-12-14 13:02 ` [PATCH v2 2/8] powerpc: Prepare to build with generic entry/exit framework Mukesh Kumar Chaurasiya
2025-12-16  9:27   ` Christophe Leroy (CS GROUP)
2025-12-16 14:42     ` Mukesh Kumar Chaurasiya
2025-12-14 13:02 ` [PATCH v2 3/8] powerpc: introduce arch_enter_from_user_mode Mukesh Kumar Chaurasiya
2025-12-16  9:38   ` Christophe Leroy (CS GROUP)
2025-12-16 14:47     ` Mukesh Kumar Chaurasiya
2025-12-14 13:02 ` [PATCH v2 4/8] powerpc: Introduce syscall exit arch functions Mukesh Kumar Chaurasiya
2025-12-16  9:46   ` Christophe Leroy (CS GROUP)
2025-12-16 14:51     ` Mukesh Kumar Chaurasiya
2025-12-14 13:02 ` [PATCH v2 5/8] powerpc: add exit_flags field in pt_regs Mukesh Kumar Chaurasiya
2025-12-16  9:52   ` Christophe Leroy (CS GROUP)
2025-12-16 14:56     ` Mukesh Kumar Chaurasiya
2025-12-14 13:02 ` [PATCH v2 6/8] powerpc: Prepare for IRQ entry exit Mukesh Kumar Chaurasiya
2025-12-16  9:58   ` Christophe Leroy (CS GROUP)
2025-12-16 15:00     ` Mukesh Kumar Chaurasiya
2025-12-16 22:40       ` Christophe Leroy (CS GROUP)
2025-12-17  4:43         ` Mukesh Kumar Chaurasiya
2025-12-19  4:56           ` Mukesh Kumar Chaurasiya
2025-12-14 13:02 ` [PATCH v2 7/8] powerpc: Enable IRQ generic entry/exit path Mukesh Kumar Chaurasiya
2025-12-16  6:29   ` kernel test robot
2025-12-16 15:02     ` Mukesh Kumar Chaurasiya
2025-12-16 10:43   ` Christophe Leroy (CS GROUP)
2025-12-16 15:06     ` Mukesh Kumar Chaurasiya
2025-12-17  2:10   ` kernel test robot
2025-12-17 21:32   ` kernel test robot
2025-12-14 13:02 ` [PATCH v2 8/8] powerpc: Enable Generic Entry/Exit for syscalls Mukesh Kumar Chaurasiya
2025-12-14 16:20   ` Segher Boessenkool
2025-12-15 18:32     ` Mukesh Kumar Chaurasiya
2025-12-15 20:27   ` kernel test robot
2025-12-16 15:08     ` Mukesh Kumar Chaurasiya
2025-12-16 22:57       ` Christophe Leroy (CS GROUP)
2025-12-16  6:41   ` Christophe Leroy (CS GROUP)
2025-12-16 15:09     ` Mukesh Kumar Chaurasiya
2025-12-16 11:01   ` Christophe Leroy (CS GROUP)
2025-12-16 15:13     ` Mukesh Kumar Chaurasiya

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).