[{"id":1763681,"web_url":"http://patchwork.ozlabs.org/comment/1763681/","msgid":"<20170905.144804.755338183074090970.davem@davemloft.net>","list_archive_url":null,"date":"2017-09-05T21:48:04","subject":"Re: [PATCH net V2] vhost_net: correctly check tx avail during rx\n\tbusy polling","submitter":{"id":15,"url":"http://patchwork.ozlabs.org/api/people/15/","name":"David Miller","email":"davem@davemloft.net"},"content":"From: Jason Wang <jasowang@redhat.com>\nDate: Tue,  5 Sep 2017 09:22:05 +0800\n\n> We check tx avail through vhost_enable_notify() in the past which is\n> wrong since it only checks whether or not guest has filled more\n> available buffer since last avail idx synchronization which was just\n> done by vhost_vq_avail_empty() before. What we really want is checking\n> pending buffers in the avail ring. Fix this by calling\n> vhost_vq_avail_empty() instead.\n> \n> This issue could be noticed by doing netperf TCP_RR benchmark as\n> client from guest (but not host). With this fix, TCP_RR from guest to\n> localhost restores from 1375.91 trans per sec to 55235.28 trans per\n> sec on my laptop (Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz).\n> \n> Fixes: 030881372460 (\"vhost_net: basic polling support\")\n> Signed-off-by: Jason Wang <jasowang@redhat.com>\n\nApplied and queued up for -stable, thanks.","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xn0hL2ZNdz9s7f\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed,  6 Sep 2017 07:48:18 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1753585AbdIEVsG (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tTue, 5 Sep 2017 17:48:06 -0400","from shards.monkeyblade.net ([184.105.139.130]:39852 \"EHLO\n\tshards.monkeyblade.net\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1753151AbdIEVsF (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Tue, 5 Sep 2017 17:48:05 -0400","from localhost (74-93-104-98-Washington.hfc.comcastbusiness.net\n\t[74.93.104.98]) (using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(Client did not present a certificate)\n\t(Authenticated sender: davem-davemloft)\n\tby shards.monkeyblade.net (Postfix) with ESMTPSA id 7637A136D3CA0;\n\tTue,  5 Sep 2017 14:48:04 -0700 (PDT)"],"Date":"Tue, 05 Sep 2017 14:48:04 -0700 (PDT)","Message-Id":"<20170905.144804.755338183074090970.davem@davemloft.net>","To":"jasowang@redhat.com","Cc":"mst@redhat.com, netdev@vger.kernel.org, kvm@vger.kernel.org,\n\tvirtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org","Subject":"Re: [PATCH net V2] vhost_net: correctly check tx avail during rx\n\tbusy polling","From":"David Miller <davem@davemloft.net>","In-Reply-To":"<1504574525-4711-1-git-send-email-jasowang@redhat.com>","References":"<1504574525-4711-1-git-send-email-jasowang@redhat.com>","X-Mailer":"Mew version 6.7 on Emacs 25.2 / Mule 6.0 (HANACHIRUSATO)","Mime-Version":"1.0","Content-Type":"Text/Plain; charset=us-ascii","Content-Transfer-Encoding":"7bit","X-Greylist":"Sender succeeded SMTP AUTH, not delayed by\n\tmilter-greylist-4.5.12 (shards.monkeyblade.net\n\t[149.20.54.216]); Tue, 05 Sep 2017 14:48:04 -0700 (PDT)","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}}]