powerpc: Remove static branch prediction in atomic{, 64}_add_unless
authorAnton Blanchard <anton@samba.org>
Mon, 3 Oct 2016 06:03:03 +0000 (17:03 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 4 Oct 2016 05:13:13 +0000 (16:13 +1100)
commit61e98ebff3ba3d3b17e999dc483c2680480ed715
tree3413b146a703edb4e7a5cbf963ce57a639ef791b
parentbb85fb5803270c52863b983596c2a038facaf4b3
powerpc: Remove static branch prediction in atomic{, 64}_add_unless

I see quite a lot of static branch mispredictions on a simple
web serving workload. The issue is in __atomic_add_unless(), called
from _atomic_dec_and_lock(). There is no obvious common case, so it
is better to let the hardware predict the branch.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/atomic.h