From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752045AbeAJUEz (ORCPT + 1 other); Wed, 10 Jan 2018 15:04:55 -0500 Received: from shards.monkeyblade.net ([184.105.139.130]:54434 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751152AbeAJUEw (ORCPT ); Wed, 10 Jan 2018 15:04:52 -0500 Date: Wed, 10 Jan 2018 15:04:50 -0500 (EST) Message-Id: <20180110.150450.1379438704417696171.davem@davemloft.net> To: jasowang@redhat.com Cc: mst@redhat.com, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, willemb@google.com Subject: Re: [PATCH net-next] vhost_net: batch used ring update in rx From: David Miller In-Reply-To: <1515493665-35306-1-git-send-email-jasowang@redhat.com> References: <1515493665-35306-1-git-send-email-jasowang@redhat.com> X-Mailer: Mew version 6.7 on Emacs 25.3 / 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 milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Wed, 10 Jan 2018 12:04:51 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: From: Jason Wang Date: Tue, 9 Jan 2018 18:27:45 +0800 > This patch tries to batched used ring update during RX. This is pretty > fit for the case when guest is much faster (e.g dpdk based > backend). In this case, used ring is almost empty: > > - we may get serious cache line misses/contending on both used ring > and used idx. > - at most 1 packet could be dequeued at one time, batching in guest > does not make much effect. > > Update used ring in a batch can help since guest won't access the used > ring until used idx was advanced for several descriptors and since we > advance used ring for every N packets, guest will only need to access > used idx for every N packet since it can cache the used idx. To have a > better interaction for both batch dequeuing and dpdk batching, > VHOST_RX_BATCH was used as the maximum number of descriptors that > could be batched. > > Test were done between two machines with 2.40GHz Intel(R) Xeon(R) CPU > E5-2630 connected back to back through ixgbe. Traffic were generated > on one remote ixgbe through MoonGen and measure the RX pps through > testpmd in guest when do xdp_redirect_map from local ixgbe to > tap. RX pps were increased from 3.05 Mpps to 4.00 Mpps (about 31% > improvement). > > One possible concern for this is the implications for TCP (especially > latency sensitive workload). Result[1] does not show obvious changes > for most of the netperf test (RR, TX, and RX). And we do get some > improvements for RX on some specific size. ... > Signed-off-by: Jason Wang Applied, thanks Jason.