diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2017-06-08 18:35:04 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-06-15 09:34:39 +0300 |
commit | acd7d8cef01537062e318143d700357d5a92bd6b (patch) | |
tree | d7a4a3ec8a0188d384739b75755515ead2924741 /fs | |
parent | 9abcc981de9775659a0f6e4a52a3448ea72e59da (diff) | |
download | linux-acd7d8cef01537062e318143d700357d5a92bd6b.tar.xz |
powerpc/64s: Optimize hypercall/syscall entry
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>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'fs')
0 files changed, 0 insertions, 0 deletions