On Wed, 1 Jul 2026 19:16:19 -0700, [email protected] wrote: > On Wed, Jul 01, 2026 at 05:05:51PM +0800, Li Zhe wrote: > > +static __always_inline void memcpy_nt_drain(void) > > +{ > > + asm volatile("sfence" : : : "memory"); > > Doing a simple grep around the tree will give you the hint to use wmb() and > not reinvent the wheel here. Not to mention that this is bypassing KCSAN > instrumentation. > > And then you don't need to go define this drain thing but simply use wmb() > because, oh, look, other architectures already define a write memory barrier > too.
Thanks for the review. Yes, a separate memcpy_nt_drain() wrapper is unnecessary. I'll drop memcpy_nt_drain() in v6 and use wmb() at the ordering points in patch 8 instead. Thanks, Zhe

