[v1,0/5] spinlock optimization and test case enhancements
Message ID | 20181220104246.5590-1-gavin.hu@arm.com (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D32181B9D6; Thu, 20 Dec 2018 11:43:07 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.101.70]) by dpdk.org (Postfix) with ESMTP id 124AA1B96E for <dev@dpdk.org>; Thu, 20 Dec 2018 11:43:06 +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 5B65EA78; Thu, 20 Dec 2018 02:43:05 -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 DB9B73F5C0; Thu, 20 Dec 2018 02:43:03 -0800 (PST) From: Gavin Hu <gavin.hu@arm.com> To: dev@dpdk.org Cc: thomas@monjalon.net, jerinj@marvell.com, hemant.agrawal@nxp.com, bruce.richardson@intel.com, chaozhu@linux.vnet.ibm.com, nd@arm.com, Honnappa.Nagarahalli@arm.com, Gavin Hu <gavin.hu@arm.com> Date: Thu, 20 Dec 2018 18:42:41 +0800 Message-Id: <20181220104246.5590-1-gavin.hu@arm.com> X-Mailer: git-send-email 2.11.0 Subject: [dpdk-dev] [PATCH v1 0/5] 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 <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Message
Gavin Hu
Dec. 20, 2018, 10:42 a.m. UTC
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 to create contention test/spinlock: get timestamp more precisely test/spinlock: amortize the cost of getting time spinlock: move the implementation to arm specific file spinlock: reimplement with atomic one-way barrier builtins .../common/include/arch/arm/rte_spinlock.h | 28 +++++++++++++++++ .../common/include/generic/rte_spinlock.h | 28 +---------------- test/test/test_spinlock.c | 35 +++++++++++----------- 3 files changed, 47 insertions(+), 44 deletions(-)