From mboxrd@z Thu Jan 1 00:00:00 1970 From: Asias He Subject: Re: [PATCH 1/3] kvm tools: Make virtio-net kvm__irq_line thread safe Date: Fri, 29 Apr 2011 15:38:13 +0800 Message-ID: <4DBA6AE5.8090703@gmail.com> References: <1304058985-13833-1-git-send-email-asias.hejun@gmail.com> <4DBA6519.5070509@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------040301030107040908060303" Cc: Cyrill Gorcunov , Ingo Molnar , Sasha Levin , Prasad Joshi , kvm@vger.kernel.org To: Pekka Enberg Return-path: Received: from mail-px0-f173.google.com ([209.85.212.173]:47622 "EHLO mail-px0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755833Ab1D2HjZ (ORCPT ); Fri, 29 Apr 2011 03:39:25 -0400 Received: by pxi16 with SMTP id 16so644271pxi.4 for ; Fri, 29 Apr 2011 00:39:24 -0700 (PDT) In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: This is a multi-part message in MIME format. --------------040301030107040908060303 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 04/29/2011 03:15 PM, Pekka Enberg wrote: > On Fri, Apr 29, 2011 at 10:13 AM, Asias He wrote: >> No. We only need it in RX path. Sasha's threadpool patch breaks this. >> I'm just moving it back. > > OK, cool! Can you send the fix as a separate patch? > Here you go. -- Best Regards, Asias He --------------040301030107040908060303 Content-Type: text/x-patch; name="0001-kvm-tools-Fix-virtio-net-RX-path-IRQ-latency.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-kvm-tools-Fix-virtio-net-RX-path-IRQ-latency.patch" >>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 --------------040301030107040908060303--