On Thu, 15 Feb 2024 23:53:51 +0000, Anish Moorthy wrote: > This series adds an option to cause stage-2 fault handlers to > KVM_MEMORY_FAULT_EXIT when they would otherwise be required to fault in > the userspace mappings. Doing so allows userspace to receive stage-2 > faults directly from KVM_RUN instead of through userfaultfd, which > suffers from serious contention issues as the number of vCPUs scales. > > Support for the new option (KVM_CAP_EXIT_ON_MISSING) is added to the > demand_paging_test, which demonstrates the scalability improvements: > the following data was collected using [2] on an x86 machine with 256 > cores. > > [...] Applied 1,2, and 4 to kvm-x86 generic, and 10-12 to kvm-x86 selftests. I skipped all KVM_CAP_EXIT_ON_MISSING as per our decision to hold off until we see the KVM userfault stuff. I skipped the docs patch because it would require more massaging than I wanted to do when applying. And lastly, I skipped the "Add memslot_flags parameter to memstress_create_vm()" patch because it would be dead code without the exit-on-missing usage. Please take a look at the selftests commits in particular, as I did a decent amount of massaging when applying. Thanks! [01/14] KVM: Clarify meaning of hva_to_pfn()'s 'atomic' parameter https://github.com/kvm-x86/linux/commit/ed2f049fc144 [02/14] KVM: Add function comments for __kvm_read/write_guest_page() https://github.com/kvm-x86/linux/commit/a3bd2f7ead6d ... [04/14] KVM: Simplify error handling in __gfn_to_pfn_memslot() https://github.com/kvm-x86/linux/commit/f588557ac4ac ... [10/14] KVM: selftests: Report per-vcpu demand paging rate from demand paging test https://github.com/kvm-x86/linux/commit/2ca76c12c48b [11/14] KVM: selftests: Allow many vCPUs and reader threads per UFFD in demand paging test https://github.com/kvm-x86/linux/commit/df4ec5aada9d [12/14] KVM: selftests: Use EPOLL in userfaultfd_util reader threads https://github.com/kvm-x86/linux/commit/0cba6442e9e2 -- https://github.com/kvm-x86/linux/tree/next