[RFC PATCH v2 12/13] powerpc/kernel: Do not inconditionally save non volatile registers on system call
Nicholas Piggin
npiggin at gmail.com
Mon Apr 6 11:25:20 AEST 2020
Christophe Leroy's on April 6, 2020 3:44 am:
> Before : 347 cycles on null_syscall
> After : 327 cycles on null_syscall
The problem I had doing this is that signal delivery wnats full regs,
and you don't know if you have a signal pending ahead of time if you
have interrupts enabled.
I began to try bailing out back to asm to save nvgprs and call again.
I think that can be made to work, but it is more complication in asm,
and I soon found that 64s CPUs don't care about NVGPRs too much so it's
nice to get rid of the !fullregs state.
Possibly another approach would be to leave interrupts disabled for the
case where you have no work to do. You could create a small
syscall_exit_prepare_nowork fastpath for that case for 32-bit, perhaps?
Thanks,
Nick
More information about the Linuxppc-dev
mailing list