From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id E8F272BA2 for ; Mon, 29 Aug 2016 10:57:56 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP; 29 Aug 2016 01:57:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,595,1464678000"; d="scan'208";a="1042802759" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga002.jf.intel.com with ESMTP; 29 Aug 2016 01:57:55 -0700 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 29 Aug 2016 01:57:55 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 29 Aug 2016 01:57:54 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.116]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.194]) with mapi id 14.03.0301.000; Mon, 29 Aug 2016 16:57:52 +0800 From: "Xu, Qian Q" To: "Xu, Qian Q" , Yuanhan Liu , "dev@dpdk.org" CC: Maxime Coquelin Thread-Topic: [dpdk-dev] [PATCH 0/6] vhost: add Tx zero copy support Thread-Index: AQHR/RSRcQ1bfF0Xl0CjS0+qeWkUdqBfpIFAgAAG++A= Date: Mon, 29 Aug 2016 08:57:52 +0000 Message-ID: <82F45D86ADE5454A95A89742C8D1410E39110BE5@SHSMSX104.ccr.corp.intel.com> References: <1471939839-29778-1-git-send-email-yuanhan.liu@linux.intel.com> <82F45D86ADE5454A95A89742C8D1410E39110B70@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <82F45D86ADE5454A95A89742C8D1410E39110B70@SHSMSX104.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 0/6] vhost: add Tx zero copy support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Aug 2016 08:57:57 -0000 Btw, some good news: if I run a simple dequeue workload (running rxonly in = vhost-pmd and runnin txonly in guest testpmd), it yields ~50% performance b= oost for packet size 1518B, but this case is without NIC.=20 And similar case as vhost<-->virtio loopback, we can see ~10% performance g= ains at 1518B without NIC.=20 Some bad news: If with the patch, I noticed a 3%-7% performance drop if zer= o-copy=3D0 compared with current DPDK(e.g: 16.07) at vhost/virtio loopback = and vhost RX only + virtio TX only. Seems the patch will=20 Impact the zero-copy=3D0 performance a little.=20 -----Original Message----- From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Xu, Qian Q Sent: Monday, August 29, 2016 4:33 PM To: Yuanhan Liu ; dev@dpdk.org Cc: Maxime Coquelin Subject: Re: [dpdk-dev] [PATCH 0/6] vhost: add Tx zero copy support I just ran a PVP test, nic receive packets then forwards to vhost PMD, and = virtio user interface. I didn't see any performance gains in this scenario.= All packet size from 64B to 1518B performance haven't got benefit from thi= s patchset, and in fact, the performance dropped a lot before 1280B, and si= milar at 1518B.=20 The TX/RX desc setting is " txd=3D64, rxd=3D128" for TX-zero-copy enabled c= ase. For TX-zero-copy disabled case, I just ran default testpmd(txd=3D512, = rxd=3D128) without the patch.=20 Could you help check if NIC2VM case?=20 -----Original Message----- From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Yuanhan Liu Sent: Tuesday, August 23, 2016 4:11 PM To: dev@dpdk.org Cc: Maxime Coquelin ; Yuanhan Liu Subject: [dpdk-dev] [PATCH 0/6] vhost: add Tx zero copy support This patch set enables vhost Tx zero copy. The majority work goes to patch = 4: vhost: add Tx zero copy. The basic idea of Tx zero copy is, instead of copying data from the desc bu= f, here we let the mbuf reference the desc buf addr directly. The major issue behind that is how and when to update the used ring. You could check the commit log of patch 4 for more details. Patch 5 introduces a new flag, RTE_VHOST_USER_TX_ZERO_COPY, to enable Tx ze= ro copy, which is disabled by default. Few more TODOs are left, including handling a desc buf that is across two p= hysical pages, updating release note, etc. Those will be fixed in later ver= sion. For now, here is a simple one that hopefully it shows the idea clearl= y. I did some quick tests, the performance gain is quite impressive. For a simple dequeue workload (running rxonly in vhost-pmd and runnin txonl= y in guest testpmd), it yields 40+% performance boost for packet size 1400B= . For VM2VM iperf test case, it's even better: about 70% boost. --- Yuanhan Liu (6): vhost: simplify memory regions handling vhost: get guest/host physical address mappings vhost: introduce last avail idx for Tx vhost: add Tx zero copy vhost: add a flag to enable Tx zero copy examples/vhost: add an option to enable Tx zero copy doc/guides/prog_guide/vhost_lib.rst | 7 +- examples/vhost/main.c | 19 ++- lib/librte_vhost/rte_virtio_net.h | 1 + lib/librte_vhost/socket.c | 5 + lib/librte_vhost/vhost.c | 12 ++ lib/librte_vhost/vhost.h | 103 +++++++++---- lib/librte_vhost/vhost_user.c | 297 +++++++++++++++++++++++---------= ---- lib/librte_vhost/virtio_net.c | 188 +++++++++++++++++++---- 8 files changed, 472 insertions(+), 160 deletions(-) -- 1.9.0