SchrodingerZhu wrote: > I'm wondering if it's better to do CAS during spinning. Implementation of CAS typically generates a write event regardless of comparison. CAS loop may lead to significantly more cache controller events. https://github.com/llvm/llvm-project/pull/92168