public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] entry: inline syscall enter/exit functions
@ 2023-12-05 13:30 Sven Schnelle
  2023-12-05 13:30 ` [PATCH 1/3] entry: move exit to usermode functions to header file Sven Schnelle
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Sven Schnelle @ 2023-12-05 13:30 UTC (permalink / raw)
  To: Thomas Gleixner, Peter Zijlstra, Andy Lutomirski
  Cc: linux-kernel, Heiko Carstens

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
  move enter_from_user_mode() to header file
  entry: move syscall_enter_from_user_mode() to header file

 include/linux/entry-common.h | 137 ++++++++++++++++++++++++++++++++-
 kernel/entry/common.c        | 145 ++---------------------------------
 2 files changed, 138 insertions(+), 144 deletions(-)

-- 
2.40.1


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

end of thread, other threads:[~2023-12-18  7:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-05 13:30 [PATCH 0/3] entry: inline syscall enter/exit functions Sven Schnelle
2023-12-05 13:30 ` [PATCH 1/3] entry: move exit to usermode functions to header file Sven Schnelle
2023-12-15 19:09   ` Thomas Gleixner
2023-12-18  7:46     ` Sven Schnelle
2023-12-05 13:30 ` [PATCH 2/3] move enter_from_user_mode() " Sven Schnelle
2023-12-05 13:30 ` [PATCH 3/3] entry: move syscall_enter_from_user_mode() " Sven Schnelle
2023-12-06 11:02 ` [PATCH 0/3] entry: inline syscall enter/exit functions Peter Zijlstra
2023-12-14  8:24   ` Sven Schnelle
2023-12-15 19:06     ` Thomas Gleixner

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