From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id D41C344C7 for ; Thu, 31 May 2018 11:55:20 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 May 2018 02:55:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,463,1520924400"; d="scan'208";a="233440528" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga006.fm.intel.com with ESMTP; 31 May 2018 02:55:19 -0700 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 31 May 2018 02:55:19 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx116.amr.corp.intel.com (10.18.116.20) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 31 May 2018 02:55:19 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.51]) by shsmsx102.ccr.corp.intel.com ([169.254.2.223]) with mapi id 14.03.0319.002; Thu, 31 May 2018 17:55:04 +0800 From: "Wang, Zhihong" To: Maxime Coquelin , "dev@dpdk.org" , "Bie, Tiwei" Thread-Topic: [PATCH v2 0/2] Vhost: unitfy receive paths Thread-Index: AQHT9zHRp0chgtCQgU6lEL3TVyKvNqRJmJKw Date: Thu, 31 May 2018 09:55:04 +0000 Message-ID: <8F6C2BD409508844A0EFC19955BE09415151C529@SHSMSX103.ccr.corp.intel.com> References: <20180529094514.23835-1-maxime.coquelin@redhat.com> In-Reply-To: <20180529094514.23835-1-maxime.coquelin@redhat.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 v2 0/2] Vhost: unitfy receive paths X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 May 2018 09:55:21 -0000 > -----Original Message----- > From: Maxime Coquelin [mailto:maxime.coquelin@redhat.com] > Sent: Tuesday, May 29, 2018 5:45 PM > To: dev@dpdk.org; Bie, Tiwei ; Wang, Zhihong > > Cc: Maxime Coquelin > Subject: [PATCH v2 0/2] Vhost: unitfy receive paths >=20 > Hi, >=20 > This second version fixes the feature bit check in > rxvq_is_mergeable(), and remove "mergeable" from rx funcs > names. No difference is seen in the benchmarks >=20 > This series is preliminary work to ease the integration of > packed ring layout support. But even without packed ring > layout, the result is positive. >=20 > First patch unify both paths, and second one is a small > optimization to avoid copying batch_copy_nb_elems VQ field > to/from the stack. >=20 > With the series applied, I get modest performance gain for > both mergeable and non-mergeable casesi (, and the gain of > about 300 LoC is non negligible maintenance-wise. >=20 > Rx-mrg=3Doff benchmarks: >=20 > +------------+-------+-------------+-------------+----------+ > | Run | PVP | Guest->Host | Host->Guest | Loopback | > +------------+-------+-------------+-------------+----------+ > | v18.05-rc5 | 14.47 | 16.64 | 17.57 | 13.15 | > | + series | 14.87 | 16.86 | 17.70 | 13.30 | > +------------+-------+-------------+-------------+----------+ >=20 > Rx-mrg=3Don benchmarks: >=20 > +------------+------+-------------+-------------+----------+ > | Run | PVP | Guest->Host | Host->Guest | Loopback | > +------------+------+-------------+-------------+----------+ > | v18.05-rc5 | 9.38 | 13.78 | 16.70 | 12.79 | > | + series | 9.38 | 13.80 | 17.49 | 13.36 | > +------------+------+-------------+-------------+----------+ >=20 > Note: Even without my series, the guest->host benchmark with > mergeable buffers enabled looks suspicious as it should in > theory be alsmost identical as when Rx mergeable buffers are > disabled. To be investigated... >=20 > Maxime Coquelin (2): > vhost: unify Rx mergeable and non-mergeable paths > vhost: improve batched copies performance >=20 > lib/librte_vhost/virtio_net.c | 376 +++++-------------------------------= ------ > 1 file changed, 37 insertions(+), 339 deletions(-) >=20 Acked-by: Zhihong Wang Thanks Maxime! This is really great to see. ;) We probably need the same improvement for Virtio-pmd. One comment on Virtio/Vhost performance analysis: No matter what type of traffic is used (PVP, or Txonly-Rxonly, Loopback...), we need to be clear on who we're testing, and give the other part excessive CPU resources, otherwise we'll be testing whoever the slowest. Since this patch is for Vhost, I suggest to run N (e.g. N =3D 4) Virtio threads on N cores, and the corresponding N Vhost threads on a single core, to do performance comparison. Do you think this makes sense? For Guest -> Host, in my test I see Rx-mrg=3Don has negative impact on Virtio side, probably because Virtio touches something that's not touched when Rx-mrg=3Doff. Thanks -Zhihong