On Wed, Jun 16, 2021 at 04:35:53PM +0200, Håkon Bugge wrote: > +#define BIT_ACCESS_FUNCTIONS(b) \ > + static inline void set_##b(unsigned long flags) \ > + { \ > + /* set_bit() does not imply a memory barrier */ \ > + smp_mb__before_atomic(); \ > + set_bit(b, &flags); \ > + /* set_bit() does not imply a memory barrier */ \ > + smp_mb__after_atomic(); \ > + } This isn't needed, set_bit/test_bit are already atomic with themselves, we should not need to introduce release semantics. Please split this to one patch per variable Every variable should be evalulated to decide if we should hold the spinlock instead of relying on atomics. Jason