On 29/10/2015 09:45, Roman Kagan wrote: > While Andrey is testing it, I'd like to ask similar question re. MSI: > why is there a "shortcut" for KVM_IRQ_ROUTING_MSI case (which we > basically modelled after) when it would probably get handled through > ->set handler in irqfd_inject() too? Because it's a bit faster that way. :) By avoiding the schedule_work, you can improve latency by a few microseconds. It's nice to have it for the VFIO case especially, where everything you do takes you further from hardware performance. However, that shortcut is badly implemented because it lets you do a walk over all CPUs while interrupts are disabled. It should be modified to use kvm_set_msi_inatomic instead of kvm_set_msi (more precisely, I would like to remove kvm_set_msi and keep kvm_arch_irq_update; then kvm_arch_irq_update will call kvm_set_msi_inatomic). I'll post a patch next Monday. You can then benchmark the addition of synthetic interrupts to the atomic-context fast path, and see if it makes a speed difference. Paolo -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html