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 7822A2BDB for ; Thu, 27 Dec 2018 05:14:12 +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 83F6FEBD; Wed, 26 Dec 2018 20:14:11 -0800 (PST) Received: from net-debian.shanghai.arm.com (net-debian.shanghai.arm.com [10.169.36.53]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id BD04F3F5AF; Wed, 26 Dec 2018 20:14:09 -0800 (PST) From: Gavin Hu To: dev@dpdk.org Cc: thomas@monjalon.net, jerinj@marvell.com, hemant.agrawal@nxp.com, bruce.richardson@intel.com, chaozhu@linux.vnet.ibm.com, Honnappa.Nagarahalli@arm.com, stephen@networkplumber.org, david.marchand@redhat.com, nd@arm.com, Gavin Hu Date: Thu, 27 Dec 2018 12:13:43 +0800 Message-Id: <20181227041349.3058-1-gavin.hu@arm.com> X-Mailer: git-send-email 2.11.0 Subject: [dpdk-dev] [PATCH v3 0/6] 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: Thu, 27 Dec 2018 04:14:12 -0000 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 (5): eal: fix clang compilation error on x86 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 Joyce Kong (1): spinlock: ticket based to improve fairness .../common/include/arch/ppc_64/rte_spinlock.h | 5 +++ .../common/include/arch/x86/rte_spinlock.h | 6 +++ lib/librte_eal/common/include/generic/rte_atomic.h | 6 +-- .../common/include/generic/rte_spinlock.h | 45 +++++++++++++++------- test/test/test_spinlock.c | 32 +++++++-------- 5 files changed, 61 insertions(+), 33 deletions(-) -- 2.11.0