Re: [RFC PATCH v3 0/3] mm: use non-temporal stores for demotion
From: Li Zhe
Date: Fri Nov 06 2026 - 03:57:03 EST
On Tue, 3 Nov 2026 14:30:22 -0800, Huan Nguyen wrote:
> Using non-temporal stores and prefetching on x86 bypasses CPU cache
> allocation, protecting active workload working sets and improving
> demotion throughput.
Could you show some real workload numbers for this? I am wondering
whether the reduced cache allocation and improved demotion throughput
also translate into visible application-level benefits.
> - Memory ordering:
> Add a wmb() barrier at the end of folio_mc_copy_nt() to ensure weakly
> ordered non-temporal stores are drained before page tables are updated.
I have not looked into all the details here, so I may be missing
something. But before migration completes, there should eventually be a
publication step that makes the new folio visible. In theory, that
publication step should already provide the required ordering before
userspace can observe the new folio. So I wonder whether the wmb() in
folio_mc_copy_nt() is really needed here.
Thanks,
Zhe