From: Michael Ellerman <patch-notifications@ellerman•id.au>
To: Nicholas Piggin <npiggin@gmail•com>, linuxppc-dev@lists•ozlabs.org
Cc: Nicholas Piggin <npiggin@gmail•com>
Subject: Re: [1/2] powerpc/64s: syscall optimize hypercall/syscall entry
Date: Mon, 19 Jun 2017 22:25:37 +1000 (AEST) [thread overview]
Message-ID: <3wrqv51dPqz9s8V@ozlabs.org> (raw)
In-Reply-To: <20170608153505.18857-1-npiggin@gmail.com>
On Thu, 2017-06-08 at 15:35:04 UTC, Nicholas Piggin wrote:
> After bc3551257a ("powerpc/64: Allow for relocation-on interrupts from
> guest to host"), a getppid() system call goes from 307 cycles to 358
> cycles (+17%) on POWER8. This is due significantly to the scratch SPR
> used by the hypercall check.
>
> It turns out there are a some volatile registers common to both system
> call and hypercall (in particular, r12, cr0, ctr), which can be used to
> avoid the SPR and some other overheads. This brings getppid to 320 cycles
> (+4%).
>
> Testing hcall entry performance by running "sc 1" in guest userspace
> before this patch is 854 cycles, afterwards is 826. Also a small win
> there.
>
> POWER9 syscall is improved by about the same amount, hcall not tested.
>
> Signed-off-by: Nicholas Piggin <npiggin@gmail•com>
Series applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/acd7d8cef01537062e318143d70035
cheers
prev parent reply other threads:[~2017-06-19 12:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-08 15:35 [PATCH 1/2] powerpc/64s: syscall optimize hypercall/syscall entry Nicholas Piggin
2017-06-08 15:35 ` [PATCH 2/2] powerpc/64: syscall avoid restore_math call if possible Nicholas Piggin
2017-06-19 12:25 ` Michael Ellerman [this message]
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=3wrqv51dPqz9s8V@ozlabs.org \
--to=patch-notifications@ellerman$(echo .)id.au \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=npiggin@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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