Skip to content

entry: inline syscall enter/exit functions

Sven Schnelle lkml oe-kbuild-all 2 versions – Applied

Status from this message: The following commit has been merged into the core/entry branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 0 repliesApplied
  2. v13 patches 5 repliesSuperseded

Changes in v2 from the cover letter

- don't move of exit_to_user_mode_loop() to header file

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/3entry: move exit to usermode functions to header fileinclude/linux/entry-common.h kernel/entry/common.c+58 -440 replies
2/3entry: move enter_from_user_mode() to header fileinclude/linux/entry-common.h kernel/entry/common.c+17 -240 replies
3/3entry: move syscall_enter_from_user_mode() to header fileinclude/linux/entry-common.h kernel/entry/common.c+26 -330 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 0/3] entry: inline syscall enter/exit functions

Hi List,

looking into the performance of syscall entry/exit after s390 switched to generic entry showed that there's quite some overhead calling some of the entry/exit work functions even when there's nothing to do. This patchset moves the entry and exit function to entry-common.h, so non inlined code gets only called when there is some work pending.

I wrote a small program that just issues invalid syscalls in a loop. On an s390 machine, this results in the following numbers:

without this series:

$ ./syscall 1000000000
runtime: 94.886581s / per-syscall 9.488658e-08s

with this series:

$ ./syscall 1000000000
runtime: 84.732391s / per-syscall 8.473239e-08s

so the time required for one syscall dropped from 94.8ns to 84.7ns, which is a drop of about 11%.

Sven Schnelle (3):
entry: move exit to usermode functions to header file
entry: move enter_from_user_mode() to header file
entry: move syscall_enter_from_user_mode() to header file

 include/linux/entry-common.h |  94 +++++++++++++++++++++++++++++--
 kernel/entry/common.c        | 106 ++++-------------------------------
 2 files changed, 100 insertions(+), 100 deletions(-)

Changes in v2:
- don't move of exit_to_user_mode_loop() to header file

Signature · 1 line
2.40.1