diff mbox

[2/2] kvm tools: Respect VRING_AVAIL_F_NO_INTERRUPT

Message ID 1304735660-10844-2-git-send-email-asias.hejun@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Asias He May 7, 2011, 2:34 a.m. UTC
Do not inject IRQ when guest suppress it.

This can reduce IRQ injection further and bumps
host to guest bandwitdh to 6178.78 Mbps(cpu 63.96%).

Signed-off-by: Asias He <asias.hejun@gmail.com>
---
 tools/kvm/virtio/core.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Comments

Ingo Molnar May 7, 2011, 7:55 a.m. UTC | #1
* Asias He <asias.hejun@gmail.com> wrote:

> Do not inject IRQ when guest suppress it.
> 
> This can reduce IRQ injection further and bumps
> host to guest bandwitdh to 6178.78 Mbps(cpu 63.96%).

Very nice!

Btw., do we have a firm resolution for the ping latency problem that the virtio 
ring-buffer and net driver suffered from? If it's fixed, which commit fixed the 
root cause?

Thanks,

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Pekka Enberg May 7, 2011, 9:03 a.m. UTC | #2
On Sat, 7 May 2011, Ingo Molnar wrote:
> Very nice!
>
> Btw., do we have a firm resolution for the ping latency problem that the virtio
> ring-buffer and net driver suffered from? If it's fixed, which commit fixed the
> root cause?

Oh, it seems that the patches fixed the "ping -f" problems for me! Asias, 
why was that not mentioned in the changelogs?

 			Pekka
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Asias He May 7, 2011, 11:25 a.m. UTC | #3
On 05/07/2011 05:03 PM, Pekka Enberg wrote:
> On Sat, 7 May 2011, Ingo Molnar wrote:
>> Very nice!
>>
>> Btw., do we have a firm resolution for the ping latency problem that
>> the virtio
>> ring-buffer and net driver suffered from? If it's fixed, which commit
>> fixed the
>> root cause?
> 
> Oh, it seems that the patches fixed the "ping -f" problems for me!
> Asias, why was that not mentioned in the changelogs?

I believe the 'ping -f' problem is fixed. I just need confirms from more
tests.
diff mbox

Patch

diff --git a/tools/kvm/virtio/core.c b/tools/kvm/virtio/core.c
index 0734984..2b3503d 100644
--- a/tools/kvm/virtio/core.c
+++ b/tools/kvm/virtio/core.c
@@ -60,6 +60,9 @@  u16 virt_queue__get_iov(struct virt_queue *queue, struct iovec iov[], u16 *out,
 
 void virt_queue__trigger_irq(struct virt_queue *vq, int irq, u8 *isr, struct kvm *kvm)
 {
+	if (vq->vring.avail->flags & VRING_AVAIL_F_NO_INTERRUPT)
+		return;
+
 	if (*isr == VIRTIO_IRQ_LOW) {
 		*isr = VIRTIO_IRQ_HIGH;
 		kvm__irq_line(kvm, irq, VIRTIO_IRQ_HIGH);