On Tue, Aug 16, 2022 at 9:22 AM Hector Martin marcan@marcan.st wrote:
It's worth pointing out that the workqueue code does *not* pair test_and_set_bit() with clear_bit(). It does an atomic_long_set() instead
Yes. That code is much too subtle.
And yes, I think those barriers are
(a) misleading
(b) don't work with the "serialize bits using spinlock" model at all
It's a good example of "we need to really have a better model for this".
Linus