On Mon, Oct 12, 2009 at 11:04:23AM +0200, Jan Kiszka wrote: > Gleb Natapov wrote: > > On Mon, Oct 12, 2009 at 10:16:56AM +0200, Jan Kiszka wrote: > >>>>> Apic is lockless. For ioapic/pic I used spinlocks initially, but Avi > >>>>> prefers mutexes. Theoretically it is possible to make them lockless, > >>>>> but code will be complex and eventually more slow, since more then two > >>>>> atomic operation will be used on irq injection path. > >>>> Well, lockless is another thing. > >>>> > >>>> But also converting to spinlocks would indeed add some overhead: > >>>> irqsave/restore. But I wonder if this isn't worth it, at least when > >>>> looking at the (supposed to be fast) device passthrough scenario which > >>>> would be simpler and faster. > >>>> > >>> Avi's point in favor of mutex is: they are as fast as spinlocks when > >>> congested and allows preemption when held. > >> ...but require scheduler activity in case of dev-passthrough, which is > >> surely playing in a different league. > >> > > I'd rather remove dev-passthrough completely than continue adding hack upon hack > > upon hack to make is some times kinda sorta work :) > > Hmm, is this code not needed for the VT-d & Co. case? Or what is the > alternative? > The smile there is for a reason. My dislike of dev-passthrough will not make it go away. Alternatives? I don't know what HW makers plans are, but with interrupt remapping + APIC vitalization in HW theoretically it is possible to inject interrupts directly from device to virtual machine. -- Gleb. -- 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