From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-f196.google.com (mail-pl1-f196.google.com [209.85.214.196]) by dpdk.org (Postfix) with ESMTP id 93C2B2BF5 for ; Thu, 13 Dec 2018 06:27:14 +0100 (CET) Received: by mail-pl1-f196.google.com with SMTP id u18so477549plq.7 for ; Wed, 12 Dec 2018 21:27:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=T0fR0/EqXIFbc+LSRx/AFcqyaxSpKfGQ2UiRCsTpl0M=; b=BT4ArSu+5xXbssMl6MNPtv+6t2OqZcj6u7Fb5Vrc6Vrcc770Hks768Sik9BVCmR9dE LtMgfSptM5QmsLRsN6QiAruGow+VBr4h9phkQ1EOTIWi24WIjMSMrJYB2p7Cb5dGi6p0 PALdigj76Q4p75tbPUHymq4+H0JLIlV6dALYF1R9dSrPSS60DMLuyIuctMR2PHwYicA4 /lqbKvFYQyY80EI3yWtUyldGRLzIKEraq8Pb1iCxcK0Hy/H55OCZAnJFwtf2fbLU0/pJ ud2Kq3sxZ5kYobeuFFjWG9MR/uFx2Opfk+smrhSRJGEOyu1LL5vhhhOyXHTikHrYF3MG NVDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=T0fR0/EqXIFbc+LSRx/AFcqyaxSpKfGQ2UiRCsTpl0M=; b=EyXKFCoW/9nTN9jwq1GcAlw56enIYavmrLQwt0umKg1MixwWv55zt7N3ifg0nMElkC m6ACyXorbYdvVBsRnZOPYLS8IQPbWbe0uLcj/tbCUDPbe6iGE6xMQP+h9W0ZsYulNqeq 4Hcdlbpwml04koLWIqkGj5VUpTdkuul0ayOPd2iSsSkdMSFsjlmn91xM4QTiuZ15d5Us 5eP+LctHnng6LWHYIoRjJDnuoDeTNZvDnoVdQExDwCFeM11BQr0wTn4aS0qYQedMMnA/ cGBxbxEnB6Z34Gc98SIos2ecAdFWLuyvdz0D/P0651vYHmKCu3m6ZdoVZ/b3Qr7JeiWm p7dw== X-Gm-Message-State: AA+aEWbn983KODcZNZZ1bgBz0HlJBqkWvlSHAqgcY6Dab6orzyCbmf9r 8a8wnCxgWpg4+jTEMm0HG/nlEw== X-Google-Smtp-Source: AFSGD/Xfhb90uqnKQJFHuLWsJawdqfyi+Of0eAEV9oSgGSwjtOjGl6gkgLUQJv1bhRK8EH/xTKgD7Q== X-Received: by 2002:a17:902:4523:: with SMTP id m32mr22289278pld.53.1544678833540; Wed, 12 Dec 2018 21:27:13 -0800 (PST) Received: from xeon-e3 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id k63sm1409491pfc.76.2018.12.12.21.27.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Dec 2018 21:27:13 -0800 (PST) Date: Wed, 12 Dec 2018 21:27:10 -0800 From: Stephen Hemminger To: Joyce Kong Cc: dev@dpdk.org, nd@arm.com, thomas@monjalon.net, jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com, honnappa.nagarahalli@arm.com, gavin.hu@arm.com Message-ID: <20181212212710.3c9ad4d3@xeon-e3> In-Reply-To: <1544672265-219262-1-git-send-email-joyce.kong@arm.com> References: <1544672265-219262-1-git-send-email-joyce.kong@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v1 0/2] reimplement rwlock and add relevant perf test case 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, 13 Dec 2018 05:27:15 -0000 On Thu, 13 Dec 2018 11:37:43 +0800 Joyce Kong wrote: > v1: reimplement rwlock with __atomic builtins, and add a rwlock perf test > on all available cores to benchmark the improvement. > > We tested the patches on three arm64 platforms, ThundeX2 gained 20% performance, > Qualcomm gained 36% and the 4-Cortex-A72 Marvell MACCHIATObin gained 19.6%. > Below is the detailed test result on ThunderX2: > > *** rwlock_autotest without __atomic builtins *** > Rwlock Perf Test on 128 cores... > Core [0] count = 281 > Core [1] count = 252 > Core [2] count = 290 > Core [3] count = 259 > Core [4] count = 287 > ... > Core [209] count = 3 > Core [210] count = 31 > Core [211] count = 120 > Total count = 18537 > > *** rwlock_autotest with __atomic builtins *** > Rwlock Perf Test on 128 cores... > Core [0] count = 346 > Core [1] count = 355 > Core [2] count = 259 > Core [3] count = 285 > Core [4] count = 320 > ... > Core [209] count = 2 > Core [210] count = 23 > Core [211] count = 63 > Total count = 22194 > > Gavin Hu (1): > rwlock: reimplement with __atomic builtins > > Joyce Kong (1): > test/rwlock: add perf test case > > lib/librte_eal/common/include/generic/rte_rwlock.h | 16 ++--- > test/test/test_rwlock.c | 71 ++++++++++++++++++++++ > 2 files changed, 79 insertions(+), 8 deletions(-) > Did you consider using a better algorithm not just better primitives. See https://locklessinc.com/articles/locks/ for a more complete discussion of alternatives like ticket locks.