cheatsheet.txt 2.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. Prior Operation Subsequent Operation
  2. --------------- ---------------------------
  3. C Self R W RMW Self R W DR DW RMW SV
  4. -- ---- - - --- ---- - - -- -- --- --
  5. Relaxed store Y Y
  6. Relaxed load Y Y Y Y
  7. Relaxed RMW operation Y Y Y Y
  8. rcu_dereference() Y Y Y Y
  9. Successful *_acquire() R Y Y Y Y Y Y
  10. Successful *_release() C Y Y Y W Y
  11. smp_rmb() Y R Y Y R
  12. smp_wmb() Y W Y Y W
  13. smp_mb() & synchronize_rcu() CP Y Y Y Y Y Y Y Y
  14. Successful full non-void RMW CP Y Y Y Y Y Y Y Y Y Y Y
  15. smp_mb__before_atomic() CP Y Y Y a a a a Y
  16. smp_mb__after_atomic() CP a a Y Y Y Y Y Y
  17. Key: Relaxed: A relaxed operation is either READ_ONCE(), WRITE_ONCE(),
  18. a *_relaxed() RMW operation, an unsuccessful RMW
  19. operation, a non-value-returning RMW operation such
  20. as atomic_inc(), or one of the atomic*_read() and
  21. atomic*_set() family of operations.
  22. C: Ordering is cumulative
  23. P: Ordering propagates
  24. R: Read, for example, READ_ONCE(), or read portion of RMW
  25. W: Write, for example, WRITE_ONCE(), or write portion of RMW
  26. Y: Provides ordering
  27. a: Provides ordering given intervening RMW atomic operation
  28. DR: Dependent read (address dependency)
  29. DW: Dependent write (address, data, or control dependency)
  30. RMW: Atomic read-modify-write operation
  31. SELF: Orders self, as opposed to accesses before and/or after
  32. SV: Orders later accesses to the same variable