[PATCH v2 8/8] powerpc: Enable Generic Entry/Exit for syscalls.
Mukesh Kumar Chaurasiya
mkchauras at linux.ibm.com
Wed Dec 17 02:09:50 AEDT 2025
On Tue, Dec 16, 2025 at 07:41:11AM +0100, Christophe Leroy (CS GROUP) wrote:
>
>
> Le 14/12/2025 à 14:02, Mukesh Kumar Chaurasiya a écrit :
> > From: Mukesh Kumar Chaurasiya <mchauras at linux.ibm.com>
> >
> > Convert the PowerPC syscall entry and exit paths to use the generic
> > entry/exit framework by selecting GENERIC_ENTRY and integrating with
> > the common syscall handling routines.
> >
> > This change transitions PowerPC away from its custom syscall entry and
> > exit code to use the generic helpers such as:
> > - syscall_enter_from_user_mode()
> > - syscall_exit_to_user_mode()
> >
> > As part of this migration:
> > - The architecture now selects GENERIC_ENTRY in Kconfig.
> > - Old tracing, seccomp, and audit handling in ptrace.c is removed in
> > favor of generic entry infrastructure.
> > - interrupt.c and syscall.c are simplified to delegate context
> > management and user exit handling to the generic entry path.
> > - The new pt_regs field `exit_flags` introduced earlier is now used
> > to carry per-syscall exit state flags (e.g. _TIF_RESTOREALL).
> >
> > This aligns PowerPC with the common entry code used by other
> > architectures and reduces duplicated logic around syscall tracing,
> > context tracking, and signal handling.
> >
> > The performance benchmarks from perf bench basic syscall 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% |
>
> I get about 2% degradation on powerpc 8xx, and it is quite stable over time
> when repeating the test.
>
> 'perf bench syscall all' on powerpc 8xx (usec per op):
>
> | Test | With Patch | Without Patch | % Change |
> | --------------- | ---------- | ------------- | -------- |
> | getppid usec/op | 2.63 | 2.63 | ~ 0% |
> | getpgid usec/op | 2.26 | 2.22 | +2,80% |
> | fork usec/op | 15300 | 15000 | +2,00% |
> | execve usec/op | 45700 | 45200 | +1.10% |
>
Ohk,
Do you have any idea where we might be loosing performance? I don't have
an 8xx chip so i am not sure where to look.
Thanks for testing it out.
Regards,
Mukesh
> Christophe
More information about the Linuxppc-dev
mailing list