v1
2026-09-03
KVM: guest_memfd: bind backing memory to a NUMA node · v1
guest_memfd新增BIND_NODE标志和node,让KVM对整inode建MPOL_BIND以绑定节点分配。
原始补丁链接
子 Patch(5)
1/5
mm/mempolicy: add mempolicy_create()
[mm/mempolicy: add mempolicy_create()] do_set_mempolicy() builds a validated policy and installs it into the current running task. An in-kernel user that wants to construct a mempolicy wants the same
2/5
mm/mempolicy: add mpol_set_shared_policy_range()
[mm/mempolicy: add mpol_set_shared_policy_range()] mpol_set_shared_policy() installs a policy over a VMA’s page-offset range, which is the only programmatic way to populate an inode’s shared policy af
3/5
KVM: guest_memfd: bind backing memory to a NUMA node at creation
guest_memfd presently allocates its page-cache folios through a per-inode shared mempolicy (kvm_gmem_get_folio()). Today that policy can only be set after the fact, via mbind() on a host mmap of the
4/5
selftests: KVM: guest_memfd: let the gmem_test() harness bind a node
To test GUEST_MEMFD_FLAG_BIND_NODE - extend create_guest_memfd() to accept a node. Ignore the node argument if the BIND_NODE flag is not provided. Signed-off-by: Gregory Price gourry@gourry.net As
5/5
selftests: KVM: guest_memfd: test GUEST_MEMFD_FLAG_BIND_NODE
Add tests for an umapped guest_memfd mempolicy configured at creation via GUEST_MEMFD_FLAG_BIND_NODE. Handles: - !CONFIG_NUMA (skips) - single node system - multi-node system (faults onto remot