On Mon, 06 May 2024 18:17:48 +0800, Yi Wang wrote: > From: Yi Wang <foxywang@xxxxxxxxxxx> > > We found that it may cost more than 20 milliseconds very accidentally > to enable cap of KVM_CAP_SPLIT_IRQCHIP on a host which has many vms > already. > > The reason is that when vmm(qemu/CloudHypervisor) invokes > KVM_CAP_SPLIT_IRQCHIP kvm will call synchronize_srcu_expedited() and > might_sleep and kworker of srcu may cost some delay during this period. > One way makes sence is setup empty irq routing when creating vm and > so that x86/s390 don't need to setup empty/dummy irq routing. > > [...] Applied to kvm-x86 generic, with a lot of fixup. A sanity check on the end result would be much appreciated. Thanks! [1/3] KVM: Setup empty IRQ routing when creating a VM https://github.com/kvm-x86/linux/commit/fbe4a7e881d4 [2/3] KVM: x86: Don't re-setup empty IRQ routing when KVM_CAP_SPLIT_IRQCHIP https://github.com/kvm-x86/linux/commit/e3c89f5dd11d [3/3] KVM: s390: Don't re-setup dummy routing when KVM_CREATE_IRQCHIP https://github.com/kvm-x86/linux/commit/c4201bd24f4a -- https://github.com/kvm-x86/linux/tree/next