Re: [PATCH 1/2] kvm tools: Respect ISR status in virtio header

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/07/2011 04:30 AM, Ingo Molnar wrote:
Hm, the ISR flag seems to be an explicit IRQ-ack mechanism, not just an
optimization.

Perhaps if the guest kernel side virtio driver expects us to do honor these
acks and not inject double irqs when the virtio driver does not expect them?

There's this code in drivers/virtio/virtio_pci.c:

         /* reading the ISR has the effect of also clearing it so it's very
          * important to save off the value. */
         isr = ioread8(vp_dev->ioaddr + VIRTIO_PCI_ISR);

Which seems to suggest that this ISR flag is more important than just a
performance hint.

Pekka: was this the patch perhaps that fixed the ping latency problem for you?

Could any virtio gents on Cc: please confirm/deny this theory? :-)

When using PCI LNK interrupts, the ISR flag serves two purposes. It indicates that an interrupt was raised (since the actual interrupt line may be shared) and it is used to acknowledge the interrupt (since PCI LNK lines are level triggered).

It seems like this patch is simply avoiding raising the interrupt line if the ISR has not been acknowledged yet. I don't think there's a functional issue here but I'm surprised that it's a win. There should be a very short window when the interrupt is lowered in the APIC but still not acknowledged in the ISR.

You should just be saving a pretty cheap system call. I wonder if the system call is taking longer than it should..

Regards,

Anthony Liguori
--
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


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux