On Mon, Jun 12, 2023 at 10:27:44AM +0000, Huang, Kai wrote: > Does it make sense? I understand your logic. AFAICS, it is correct (smp_mb() instead of __mb() would be better), but it is not justified from complexity PoV. This lockless exercise gave me a pause to understand. Lockless doesn't buy you anything here, only increases complexity. Just take a lock. Kernel is big. I'm sure you'll find a better opportunity to be clever about serialization :P -- Kiryl Shutsemau / Kirill A. Shutemov