public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Sven Schnelle <svens@linux.ibm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Andy Lutomirski <luto@kernel.org>,
	linux-kernel@vger.kernel.org, Heiko Carstens <hca@linux.ibm.com>
Subject: Re: [PATCH 0/3] entry: inline syscall enter/exit functions
Date: Wed, 6 Dec 2023 12:02:02 +0100	[thread overview]
Message-ID: <20231206110202.GD30174@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20231205133015.752543-1-svens@linux.ibm.com>

On Tue, Dec 05, 2023 at 02:30:12PM +0100, Sven Schnelle wrote:
> 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.

So per that logic you wouldn't need to inline exit_to_user_mode_loop()
for example, that's only called when there is a EXIT_TO_USER_MODE_WORK
bit set.

That is, I'm just being pedantic here and pointing out that your
justification doesn't cover the extent of the changes.

> 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%.

That is obviously very nice, and I don't immediately see anything wrong
with moving the lot to header based inlines.

Thomas?

  parent reply	other threads:[~2023-12-06 11:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Peter Zijlstra [this message]
2023-12-14  8:24   ` [PATCH 0/3] entry: inline syscall enter/exit functions Sven Schnelle
2023-12-15 19:06     ` Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231206110202.GD30174@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=hca@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=svens@linux.ibm.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox