From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gavin Hu Subject: [PATCH v2 0/5] spinlock optimization and test case enhancements Date: Fri, 21 Dec 2018 01:42:24 +0800 Message-ID: <20181220174229.5834-1-gavin.hu@arm.com> References: <20181220104246.5590-1-gavin.hu@arm.com> Cc: thomas@monjalon.net, bruce.richardson@intel.com, jerinj@marvell.com, hemant.agrawal@nxp.com, ferruh.yigit@intel.com, Honnappa.Nagarahalli@arm.com, nd@arm.com, Gavin Hu To: dev@dpdk.org Return-path: Received: from foss.arm.com (foss.arm.com [217.140.101.70]) by dpdk.org (Postfix) with ESMTP id 0473E5B2C for ; Thu, 20 Dec 2018 18:42:49 +0100 (CET) In-Reply-To: <20181220104246.5590-1-gavin.hu@arm.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" V2: 1. FORCE_INTRINCIS is still an option for ppc/x86, although not is use by default, so don't remove it from generic file. 2. Fix the clang compiler error on x86 when the above FORCE_INTRINSICS is enabled. V1: 1. Remove the 1us delay outside of the locked region to really benchmark the spinlock acquire/release performance, not the delay API. 2. Use the precise version of getting timestamps for more precise benchmarking results. 3. Amortize the overhead of getting the timestamp by 10000 loops. 4. Move the arm specific implementation to arm folder to remove the hardcoded implementation. 5. Use atomic primitives, which translate to one-way barriers, instead of two-way sync primitives, to optimize for performance. Gavin Hu (5): test/spinlock: remove 1us delay for correct benchmarking test/spinlock: get timestamp more precisely test/spinlock: amortize the cost of getting time spinlock: reimplement with atomic one-way barrier builtins eal: fix clang compilation error on x86 lib/librte_eal/common/include/generic/rte_atomic.h | 6 ++-- .../common/include/generic/rte_spinlock.h | 18 ++++++++---- test/test/test_spinlock.c | 32 +++++++++++----------- 3 files changed, 32 insertions(+), 24 deletions(-) -- 2.11.0