From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.101.70]) by dpdk.org (Postfix) with ESMTP id E7F2B5F17 for ; Tue, 15 Jan 2019 11:32:49 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 275EB1596; Tue, 15 Jan 2019 02:32:49 -0800 (PST) Received: from net-arm-c2400.shanghai.arm.com (net-arm-c2400.shanghai.arm.com [10.169.41.165]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 99BAF3F70D; Tue, 15 Jan 2019 02:32:47 -0800 (PST) From: gavin hu To: dev@dpdk.org Cc: nd@arm.com, thomas@monjalon.net, jerinj@marvell.com, hemant.agrawal@nxp.com, Honnappa.Nagarahalli@arm.com, gavin.hu@arm.com, olivier.matz@6wind.com, bruce.richardson@intel.com Date: Tue, 15 Jan 2019 18:32:30 +0800 Message-Id: <1547548354-44671-1-git-send-email-gavin.hu@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <20181220104246.5590-1-gavin.hu@arm.com> References: <20181220104246.5590-1-gavin.hu@arm.com> Subject: [dpdk-dev] [PATCH v5 0/4] spinlock optimization and test case enhancements 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: Tue, 15 Jan 2019 10:32:50 -0000 V5: Remove ChangeId(sorry for that) V4: 1. Drop one patch for the test case to get time precisely as the overhead of getting time is amortized already in another patch. 2. Drop the ticket lock patch from this series as there are no dependency between them, the ticket lock patch was submitted separately: http://patchwork.dpdk.org/patch/49770/ 3. Define volatile variable in patch #3 to be more realistic for spinlock protection(avoid optimization be compiler). 4. Fix typos. V3: 1. Implemented the ticket lock to improve the fairness and predictability. The locks are obtained in the order of requested. 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 (4): eal: fix clang compilation error on x86 test/spinlock: remove 1us delay for correct benchmarking test/spinlock: amortize the cost of getting time spinlock: reimplement with atomic one-way barrier builtins lib/librte_eal/common/include/generic/rte_atomic.h | 6 ++--- .../common/include/generic/rte_spinlock.h | 18 +++++++++---- test/test/test_spinlock.c | 31 +++++++++++----------- 3 files changed, 32 insertions(+), 23 deletions(-) -- 2.7.4