cloud-hypervisor/vmm/src
Rob Bradford 0fec326582 hypervisor, vmm: Remove shared ownership of VmmOps
This interface is used by the vCPU thread to delegate responsibility for
handling MMIO/PIO operations and to support different approaches than a
VM exit.

During profiling I found that we were spending 13.75% of the boot CPU
uage acquiring access to the object holding the VmmOps via
ArcSwap::load_full()

    13.75%     6.02%  vcpu0            cloud-hypervisor    [.] arc_swap::ArcSwapAny<T,S>::load_full
            |
            ---arc_swap::ArcSwapAny<T,S>::load_full
               |
                --13.43%--<hypervisor::kvm::KvmVcpu as hypervisor::cpu::Vcpu>::run
                          std::sys_common::backtrace::__rust_begin_short_backtrace
                          core::ops::function::FnOnce::call_once{{vtable-shim}}
                          std::sys::unix:🧵:Thread:🆕:thread_start

However since the object implementing VmmOps does not need to be mutable
and it is only used from the vCPU side we can change the ownership to
being a simple Arc<> that is passed in when calling create_vcpu().

This completely removes the above CPU usage from subsequent profiles.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-11-19 00:16:02 +01:00
..
api vmm: api: Implement API support for migration 2020-11-11 11:07:24 +01:00
acpi.rs
config.rs config, device_manager: Add support for disabling io_uring for testing 2020-11-18 11:47:54 +01:00
cpu.rs hypervisor, vmm: Remove shared ownership of VmmOps 2020-11-19 00:16:02 +01:00
device_manager.rs config, device_manager: Add support for disabling io_uring for testing 2020-11-18 11:47:54 +01:00
device_tree.rs vmm: Remove mmio and pci differentiation 2020-10-19 14:58:48 +01:00
interrupt.rs hypervisor, vmm: Remove shared ownership of VmmOps 2020-11-19 00:16:02 +01:00
lib.rs vmm: Implement live migration 2020-11-17 16:57:11 +00:00
memory_manager.rs memory_manager: Generate a MemoryRangeTable for dirty ranges 2020-11-17 16:57:11 +00:00
migration.rs
seccomp_filters.rs vmm, hypervisor: Fix snapshot/restore for Windows guest 2020-10-21 19:11:03 +01:00
vm.rs hypervisor, vmm: Remove shared ownership of VmmOps 2020-11-19 00:16:02 +01:00