| Issue |
208305
|
| Summary |
[libc++] Atomic contention tables use constructive interference to avoid false sharing, should use destructive
|
| Labels |
libc++
|
| Assignees |
huixie90
|
| Reporter |
ldionne
|
IIUC, constructive interference is intended to promote true sharing (two datum being accessed together are placed on the same cache line), while destructive interference is intended to avoid false sharing (multiple cores accessing data on the same cache line, messing up memory fetching). I think we intend to do the latter in the contention tables for atomic, but we use `constructive_interference_size`:
https://github.com/llvm/llvm-project/blob/bd9554f5da14d3a627fb8effc1769541ca05e4f9/libcxx/src/atomic.cpp#L419-L423
and
https://github.com/llvm/llvm-project/blob/bd9554f5da14d3a627fb8effc1769541ca05e4f9/libcxx/src/atomic.cpp#L434-L439
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs