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.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Reply via email to