On Fri, Jun 2, 2023 at 1:59 PM Oleg Nesterov <oleg@xxxxxxxxxx> wrote: > > As I said from the very beginning, this code is fine on x86 because > atomic ops are fully serialised on x86. Yes. Other architectures require __smp_mb__{before,after}_atomic for the bit setting ops to actually be memory barriers. We *should* probably have acquire/release versions of the bit test/set helpers, but we don't, so they end up being full memory barriers with those things. Which isn't optimal, but I doubt it matters on most architectures. So maybe we'll some day have a "test_bit_acquire()" and a "set_bit_release()" etc. Linus _______________________________________________ Virtualization mailing list Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linuxfoundation.org/mailman/listinfo/virtualization