From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bruce Richardson Subject: Re: [PATCH v6 0/6] distributor library performance enhancements Date: Mon, 23 Jan 2017 17:02:22 +0000 Message-ID: <20170123170222.GA143068@bricha3-MOBL3.ger.corp.intel.com> References: <1484903933-127190-2-git-send-email-david.hunt@intel.com> <1485163480-156507-1-git-send-email-david.hunt@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org To: David Hunt Return-path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 5C2D3108F for ; Mon, 23 Jan 2017 18:02:25 +0100 (CET) Content-Disposition: inline In-Reply-To: <1485163480-156507-1-git-send-email-david.hunt@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, Jan 23, 2017 at 09:24:34AM +0000, David Hunt wrote: > This patch aims to improve the throughput of the distributor library. > > It uses a similar handshake mechanism to the previous version of > the library, in that bits are used to indicate when packets are ready > to be sent to a worker and ready to be returned from a worker. One main > difference is that instead of sending one packet in a cache line, it makes > use of the 7 free spaces in the same cache line in order to send up to > 8 packets at a time to/from a worker. > > The flow matching algorithm has had significant re-work, and now keeps an > array of inflight flows and an array of backlog flows, and matches incoming > flows to the inflight/backlog flows of all workers so that flow pinning to > workers can be maintained. > > The Flow Match algorithm has both scalar and a vector versions, and a > function pointer is used to select the post appropriate function at run time, > depending on the presence of the SSE2 cpu flag. On non-x86 platforms, the > the scalar match function is selected, which should still gives a good boost > in performance over the non-burst API. > > v2 changes: > * Created a common distributor_priv.h header file with common > definitions and structures. > * Added a scalar version so it can be built and used on machines without > sse2 instruction set > * Added unit autotests > * Added perf autotest > > v3 changes: > * Addressed mailing list review comments > * Test code removal > * Split out SSE match into separate file to facilitate NEON addition > * Cleaned up conditional compilation flags for SSE2 > * Addressed c99 style compilation errors > * rebased on latest head (Jan 2 2017, Happy New Year to all) > > v4 changes: > * fixed issue building shared libraries > > v5 changes: > * Removed some un-needed code around retries in worker API calls > * Cleanup due to review comments on mailing list > * Cleanup of non-x86 platform compilation, fallback to scalar match > > v6 changes: > * Fixed intermittent segfault where num pkts not divisible > by BURST_SIZE > * Cleanup due to review comments on mailing list > * Renamed _priv.h to _private.h. > > Notes: > Apps must now work in bursts, as up to 8 are given to a worker at a time > For performance in matching, Flow ID's are 15-bits > Original API (and code) is kept for backward compatibility > > Performance Gains > 2.2GHz Intel(R) Xeon(R) CPU E5-2699 v4 @ 2.20GHz > 2 x XL710 40GbE NICS to 2 x 40Gbps traffic generator channels 64b packets > separate cores for rx, tx, distributor > 1 worker - 4.8x > 4 workers - 2.9x > 8 workers - 1.8x > 12 workers - 2.1x > 16 workers - 1.8x > Series Acked-by: Bruce Richardson