diff options
author | David Matlack <[email protected]> | 2021-08-04 22:28:42 +0000 |
---|---|---|
committer | Paolo Bonzini <[email protected]> | 2021-08-06 07:52:29 -0400 |
commit | 601f8af01e5ae535b45cdb91234887c9fd861ad4 (patch) | |
tree | b4cba5a72f0b37dcd6ec552c5cf47b3a4018ddbb /tools/perf/scripts/python/mem-phys-addr.py | |
parent | 081de470f1e6e83f9f460ba5ae8f57ff07f37692 (diff) |
KVM: x86/mmu: Leverage vcpu->last_used_slot for rmap_add and rmap_recycle
rmap_add() and rmap_recycle() both run in the context of the vCPU and
thus we can use kvm_vcpu_gfn_to_memslot() to look up the memslot. This
enables rmap_add() and rmap_recycle() to take advantage of
vcpu->last_used_slot and avoid expensive memslot searching.
This change improves the performance of "Populate memory time" in
dirty_log_perf_test with tdp_mmu=N. In addition to improving the
performance, "Populate memory time" no longer scales with the number
of memslots in the VM.
Command | Before | After
------------------------------- | ---------------- | -------------
./dirty_log_perf_test -v64 -x1 | 15.18001570s | 14.99469366s
./dirty_log_perf_test -v64 -x64 | 18.71336392s | 14.98675076s
Reviewed-by: Paolo Bonzini <[email protected]>
Signed-off-by: David Matlack <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/mem-phys-addr.py')
0 files changed, 0 insertions, 0 deletions