powerpc/64s: msgclr when handling doorbell exceptions from system reset
authorNicholas Piggin <npiggin@gmail.com>
Tue, 13 Jun 2017 13:05:48 +0000 (23:05 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 19 Jun 2017 09:46:27 +0000 (19:46 +1000)
commita9af97aa0a12c30178dd7ad9af8887d5b9c4647b
tree463875705ded254aebad36ee4347c5eeba5b0846
parent771d4304d07f080b6ce751e12f3579cb012a1b22
powerpc/64s: msgclr when handling doorbell exceptions from system reset

msgsnd doorbell exceptions are cleared when the doorbell interrupt is
taken. However if a doorbell exception causes a system reset interrupt
wake from power saving state, the message is not cleared. Processing
the doorbell from the system reset interrupt requires msgclr to avoid
taking the exception again.

Testing this plus the previous wakup direct patch gives:

                                original         wakeup direct     msgclr
Different threads, same core:   315k/s           264k/s            345k/s
Different cores:                235k/s           242k/s            242k/s

Net speedup is +10% for same core, and +3% for different core.

Reviewed-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/dbell.h
arch/powerpc/include/asm/ppc-opcode.h
arch/powerpc/kernel/asm-offsets.c
arch/powerpc/kernel/exceptions-64s.S