>From 9c188853435be23ad2a73b5062690eb9f2ff1d25 Mon Sep 17 00:00:00 2001 From: Asias He Date: Fri, 29 Apr 2011 10:43:35 +0800 Subject: [PATCH] kvm tools: Fix virtio-net RX path IRQ latency The TX path does not need this ;-) Signed-off-by: Asias He --- tools/kvm/virtio-net.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/kvm/virtio-net.c b/tools/kvm/virtio-net.c index 58b3de4..310c061 100644 --- a/tools/kvm/virtio-net.c +++ b/tools/kvm/virtio-net.c @@ -77,9 +77,10 @@ static void virtio_net_rx_callback(struct kvm *self, void *param) head = virt_queue__get_iov(vq, iov, &out, &in, self); len = readv(net_device.tap_fd, iov, in); virt_queue__set_used_elem(vq, head, len); - } - kvm__irq_line(self, VIRTIO_NET_IRQ, 1); + /* We should interrupt guest right now, otherwise latency is huge. */ + kvm__irq_line(self, VIRTIO_NET_IRQ, 1); + } } static void virtio_net_tx_callback(struct kvm *self, void *param) -- 1.7.4.4