jackmanb added a comment.

I thought a little more about something I was saying in the office hours.

I'm pretty sure GCC's `__atomic_store(&x, &y, order)` should fail to compile 
for anything other than `order=__ATOMIC_RELAXED`, since with the current kernel 
patchset we have `BPF_SET` (which is called `BPF_XCHG` in this LLVM patch) 
implemented with the kernel's `atomic_store`, which _doesn't imply a barrier_.

One alternative solution might be just to scrap `BPF_SET` without `BPF_FETCH` 
(`BPF_SET | BPF_FETCH` is implemented with `atomic_xchg` which _does_ imply a 
barrier IIUC).  As we discussed in the office hours, `BPF_CMPSET` (called 
`BPF_CMPXCHG` in this LLVM patch) won't be supported without `BPF_FETCH`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72184/new/

https://reviews.llvm.org/D72184

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to