Revision b97021f85517552ea8a0d2c1680c1ee4beab6d14 authored by Benjamin Herrenschmidt on 15 November 2011, 17:11:27 UTC, committed by Benjamin Herrenschmidt on 17 November 2011, 05:26:07 UTC
The Documentation/memory-barriers.txt document requires that atomic operations that return a value act as a memory barrier both before and after the actual atomic operation. Our current implementation doesn't guarantee this. More specifically, while a load following the isync can not be issued before stwcx. has completed, that completion doesn't architecturally means that the result of stwcx. is visible to other processors (or any previous stores for that matter) (typically, the other processors L1 caches can still hold the old value). This has caused an actual crash in RCU torture testing on Power 7 This fixes it by changing those atomic ops to use new macros instead of RELEASE/ACQUIRE barriers, called ATOMIC_ENTRY and ATMOIC_EXIT barriers, which are then defined respectively to lwsync and sync. I haven't had a chance to measure the performance impact (or rather what I measured with kernel compiles is in the noise, I yet have to find a more precise benchmark) Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
1 parent a9a8f77
File | Mode | Size |
---|---|---|
apparmor | ||
integrity | ||
keys | ||
selinux | ||
smack | ||
tomoyo | ||
Kconfig | -rw-r--r-- | 7.9 KB |
Makefile | -rw-r--r-- | 941 bytes |
capability.c | -rw-r--r-- | 23.3 KB |
commoncap.c | -rw-r--r-- | 27.4 KB |
device_cgroup.c | -rw-r--r-- | 11.4 KB |
inode.c | -rw-r--r-- | 8.7 KB |
lsm_audit.c | -rw-r--r-- | 8.9 KB |
min_addr.c | -rw-r--r-- | 1.3 KB |
security.c | -rw-r--r-- | 33.6 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...