summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/barrier.h
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2017-06-09 01:36:08 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2017-06-15 16:34:39 +1000
commit9145effd626d155484f73db24ab3e142ecda31db (patch)
tree0425c4849b69d9e4adc639a9e1969e95eb2d5901 /arch/powerpc/include/asm/barrier.h
parent837e72f78a72ef43a0c5e179f3addadb2a225f80 (diff)
downloadlinux-9145effd626d155484f73db24ab3e142ecda31db.tar.bz2
powerpc/64: Drop explicit hwsync in context switch
The sync (aka. hwsync, aka. heavyweight sync) in the context switch code to prevent MMIO access being reordered from the point of view of a single process if it gets migrated to a different CPU is not required because there is an hwsync performed earlier in the context switch path. Comment this so it's clear enough if anything changes on the scheduler or the powerpc sides. Remove the hwsync from _switch. This improves context switch performance by 2-3% on POWER8. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm/barrier.h')
-rw-r--r--arch/powerpc/include/asm/barrier.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/barrier.h b/arch/powerpc/include/asm/barrier.h
index c0deafc212b8..25d42bd3f114 100644
--- a/arch/powerpc/include/asm/barrier.h
+++ b/arch/powerpc/include/asm/barrier.h
@@ -74,6 +74,11 @@ do { \
___p1; \
})
+/*
+ * This must resolve to hwsync on SMP for the context switch path.
+ * See _switch, and core scheduler context switch memory ordering
+ * comments.
+ */
#define smp_mb__before_spinlock() smp_mb()
#include <asm-generic/barrier.h>