diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2017-06-09 01:35:05 +1000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-06-15 16:34:39 +1000 |
commit | bc4f65e4cf9d6cc43e0e9ba0b8648cf9201cd55f (patch) | |
tree | dcc4f6b0f90b5533b887651f93f38dd780f0d23a /drivers/power | |
parent | acd7d8cef01537062e318143d700357d5a92bd6b (diff) | |
download | op-kernel-dev-bc4f65e4cf9d6cc43e0e9ba0b8648cf9201cd55f.zip op-kernel-dev-bc4f65e4cf9d6cc43e0e9ba0b8648cf9201cd55f.tar.gz |
powerpc/64: Avoid restore_math call if possible in syscall exit
The syscall exit code that branches to restore_math is quite heavy on
Book3S, consisting of 2 mtmsr instructions. Threads that don't use both
FP and vector can get caught here if the kernel ever uses FP or vector.
Lazy-FP/vec context switching also trips this case.
So check for lazy FP and vector before switching RI for restore_math.
Move most of this case out of line.
For threads that do want to restore math registers, the MSR switches are
still suboptimal. Future direction may be to use a soft-RI bit to avoid
MSR switches in kernel (similar to soft-EE), but for now at least the
no-restore
POWER9 context switch rate increases by about 5% due to sched_yield(2)
return performance. I haven't constructed a test to measure the syscall
cost.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'drivers/power')
0 files changed, 0 insertions, 0 deletions