From patchwork Wed Mar 17 14:43:50 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 86354 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2HEoMtS020386 for ; Wed, 17 Mar 2010 14:50:22 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755032Ab0CQOt4 (ORCPT ); Wed, 17 Mar 2010 10:49:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47409 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753606Ab0CQOtz (ORCPT ); Wed, 17 Mar 2010 10:49:55 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o2HElH6F032363 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 17 Mar 2010 10:47:17 -0400 Received: from redhat.com (vpn2-9-97.ams2.redhat.com [10.36.9.97]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id o2HElCRJ026540; Wed, 17 Mar 2010 10:47:13 -0400 Date: Wed, 17 Mar 2010 16:43:50 +0200 From: "Michael S. Tsirkin" To: "Michael S. Tsirkin" , Juan Quintela , Unai Uribarri , kvm@vger.kernel.org, virtualization@lists.osdl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] vhost: fix interrupt mitigation with raw sockets Message-ID: <20100317144350.GB3984@redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 17 Mar 2010 14:50:22 +0000 (UTC) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index fcafb6b..a6a88df 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -125,7 +125,7 @@ static void handle_tx(struct vhost_net *net) mutex_lock(&vq->mutex); vhost_disable_notify(vq); - if (wmem < sock->sk->sk_sndbuf * 2) + if (wmem < sock->sk->sk_sndbuf / 2) tx_poll_stop(net); hdr_size = vq->hdr_size;