]> Gentwo Git Trees - linux/.git/commit
KVM: Avoid synchronize_srcu() in kvm_io_bus_register_dev()
authorKeir Fraser <keirf@google.com>
Tue, 9 Sep 2025 10:00:07 +0000 (10:00 +0000)
committerMarc Zyngier <maz@kernel.org>
Mon, 15 Sep 2025 09:55:23 +0000 (10:55 +0100)
commit7d9a0273c45962e9a6bc06f3b87eef7c431c1853
tree163b60288a036257cfa8921cbd06537f4c084559
parent7788255aba6545a27b8d143c5256536f8dfb2c0a
KVM: Avoid synchronize_srcu() in kvm_io_bus_register_dev()

Device MMIO registration may happen quite frequently during VM boot,
and the SRCU synchronization each time has a measurable effect
on VM startup time. In our experiments it can account for around 25%
of a VM's startup time.

Replace the synchronization with a deferred free of the old kvm_io_bus
structure.

Tested-by: Li RongQing <lirongqing@baidu.com>
Signed-off-by: Keir Fraser <keirf@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
include/linux/kvm_host.h
virt/kvm/kvm_main.c