On Fri, Oct 07, 2022, Sean Christopherson wrote: > On Thu, Oct 06, 2022, Mingwei Zhang wrote: > > I have a limited knowledge on MM, but from my observations, it looks > > like the property of a page being "PINNED" is very unreliable (or > > expensive), i.e., anyone can jump in and pin the page. So it is hard > > to see whether a page is truly "PINNED" or maybe just someone is > > "working" on it without holding the lock. > > mm/ differentiates between various types of pins, e.g. elevated refcount vs. pin > vs. longterm pin. See the comments in include/linux/mm.h for FOLL_PIN. Ah, after catching up on the off-list thread, I suspect you're referring to the the fact that even longterm pins don't prevent zapping[*]. NUMA balancing - already discussed PMD splitting - If necessary, solvable by introducing MMU_NOTIFY_SPLIT, as a true split doesn't reclaim memory, i.e. KVM doesn't need to do WBINVD. Unfortunately, not straightforward as __split_huge_pmd_locked() may zap instead of split, but it is solvable. KSM - absolutely should not be turned on for SEV guests [*] https://lore.kernel.org/linux-arm-kernel/YuEMkKY2RU%2F2KiZW@monolith.localdoman