Skip to contentSkip to conversation

s390: more efficient smp barriers

PATCH In review Michael S. Tsirkin 2 participants 2 messages Jan 10, 2016 – Jan 11, 2016 s390

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 s390: more efficient smp barriers

As per: lkml.kernel.org/r/20150921112252.3c2937e1@mschwide atomics imply a barrier on s390, so s390 should change smp_mb__before_atomic and smp_mb__after_atomic to barrier() instead of smp_mb() and hence should not use the generic versions.

---

This is on top of arch barrier cleanup patchset,
will be included in v3 of that patchset.

 arch/s390/include/asm/barrier.h | 3 +++
 1 file changed, 3 insertions(+)
arch/s390/include/asm/barrier.h +3 -0
index 4d26fa4..5c8db3c 100644
@@ -45,6 +45,9 @@ do {									\
 	___p1;								\
 })
 
+#define __smp_mb__before_atomic()	barrier()
+#define __smp_mb__after_atomic()	barrier()
+
 #include <asm-generic/barrier.h>
 
 #endif /* __ASM_BARRIER_H */
Signature · 1 line
MST
Acked-by on v1 1/1
#1 lore raw
Quoted 21 lines · On Sun, 10 Jan 2016 13:53:26 +0200 "Michael S. Tsirkin" <[email protected]> wrote:

As per: lkml.kernel.org/r/20150921112252.3c2937e1@mschwide atomics imply a barrier on s390, so s390 should change smp_mb__before_atomic and smp_mb__after_atomic to barrier() instead of smp_mb() and hence should not use the generic versions.

---

This is on top of arch barrier cleanup patchset,
will be included in v3 of that patchset.

 arch/s390/include/asm/barrier.h | 3 +++
 1 file changed, 3 insertions(+)
arch/s390/include/asm/barrier.h +0 -0
index 4d26fa4..5c8db3c 100644

arch/s390/include/asm/barrier.h do { \ · line 53

Quoted 9 lines
arch/s390/include/asm/barrier.h +3 -0
@@ -45,6 +45,9 @@ do {									\
 	___p1;								\
 })
 
+#define __smp_mb__before_atomic()	barrier()
+#define __smp_mb__after_atomic()	barrier()
+
 #include <asm-generic/barrier.h>
 
 #endif /* __ASM_BARRIER_H */

Feel free to add:

Signature · 4 lines
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.