Best way to busy-wait for a virtio queue?

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

 



Is there any preferred way to busy-wait on a virtio event?  As in: the
guest doesn't have anything useful to do until something is plopped down
on the virtio queue, but would like to proceed as quickly as possible
after that.  Passing through an interrupt handler seems like unnecessary
overhead.

Right now I have a poll loop looking like (pseudocode):

outw(0, trigger);
while (readl(ring->output pointer) != final output pointer)
	cpu_relax();		/* x86 PAUSE instruction */

... but I have no idea how much sense that makes.


	-hpa
--
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