From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 360D8A0AC5 for ; Wed, 1 May 2019 20:06:12 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 323271DBF; Wed, 1 May 2019 20:06:11 +0200 (CEST) Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58]) by dpdk.org (Postfix) with ESMTP id 74F4A1DBC for ; Wed, 1 May 2019 20:06:10 +0200 (CEST) Received: from cpe-2606-a000-111b-405a-0-0-0-162e.dyn6.twc.com ([2606:a000:111b:405a::162e] helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1hLtcA-0005Gz-0r; Wed, 01 May 2019 14:05:59 -0400 Date: Wed, 1 May 2019 14:05:24 -0400 From: Neil Horman To: Honnappa Nagarahalli Cc: "konstantin.ananyev@intel.com" , "stephen@networkplumber.org" , "paulmck@linux.ibm.com" , "marko.kovacevic@intel.com" , "dev@dpdk.org" , "Gavin Hu (Arm Technology China)" , Dharmik Thakkar , Malvika Gupta , nd Message-ID: <20190501180524.GC26521@hmswarspite.think-freely.org> References: <20181122033055.3431-1-honnappa.nagarahalli@arm.com> <20190501035419.33524-1-honnappa.nagarahalli@arm.com> <20190501121545.GA26521@hmswarspite.think-freely.org> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) X-Spam-Score: -2.9 (--) X-Spam-Status: No Subject: Re: [dpdk-dev] [PATCH v9 0/4] lib/rcu: add RCU library supporting QSBR mechanism 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190501180524._Kp_CUeSpRUKS9O_ram6UJgC2fMO_Um7x1iHG3ilX_Y@z> On Wed, May 01, 2019 at 02:56:48PM +0000, Honnappa Nagarahalli wrote: > > > > On Tue, Apr 30, 2019 at 10:54:15PM -0500, Honnappa Nagarahalli wrote: > > > Lock-less data structures provide scalability and determinism. > > > They enable use cases where locking may not be allowed (for ex: > > > real-time applications). > > > > > I know this is version 9 of the patch, so I'm sorry for the late comment, but I > > have to ask: Why re-invent this wheel? There are already several Userspace > Thanks Neil, for asking the question. This has been debated before. Please refer to [2] for more details. > > liburcu [1] was explored as it seemed to be familiar to others in the community . I am not aware of any other library. > > There are unique requirements in DPDK and there is still scope for improvement from what is available. I have explained this in the cover letter without making a direct comparison to liburcu. May be it is worth tweaking the documentation to call this out explicitly. > I think what you're referring to here is the need for multiple QSBR variables, yes? I'm not sure thats, strictly speaking, a requirement. It seems like its a performance improvement, but I'm not sure thats the case (see performance numbers below). Regarding performance, we can't keep using raw performance as a trump card for all other aspects of the DPDK. This entire patch is meant to improve performance, it seems like it would be worthwhile to gain the code consolidation and reuse benefits for the minor performance hit. Further to performance, I may be misreading this, but I ran the integrated performance test you provided in this patch, as well as the benchmark tests for liburcw (trimmed for easier reading here) liburcw: [nhorman@hmswarspite benchmark]$ ./test_urcu 7 1 1 -v -a 0 -a 1 -a 2 -a 3 -a 4 -a 5 -a 6 -a 7 -a 0 Adding CPU 0 affinity Adding CPU 1 affinity Adding CPU 2 affinity Adding CPU 3 affinity Adding CPU 4 affinity Adding CPU 5 affinity Adding CPU 6 affinity Adding CPU 7 affinity Adding CPU 0 affinity running test for 1 seconds, 7 readers, 1 writers. Writer delay : 0 loops. Reader duration : 0 loops. thread main , tid 22712 thread_begin reader, tid 22726 thread_begin reader, tid 22729 thread_begin reader, tid 22728 thread_begin reader, tid 22727 thread_begin reader, tid 22731 thread_begin reader, tid 22730 thread_begin reader, tid 22732 thread_begin writer, tid 22733 thread_end reader, tid 22729 thread_end reader, tid 22731 thread_end reader, tid 22730 thread_end reader, tid 22728 thread_end reader, tid 22727 thread_end writer, tid 22733 thread_end reader, tid 22726 thread_end reader, tid 22732 total number of reads : 1185640774, writes 264444 SUMMARY /home/nhorman/git/userspace-rcu/tests/benchmark/.libs/lt-test_urcu testdur 1 nr_readers 7 rdur 0 wdur 0 nr_writers 1 wdelay 0 nr_reads 1185640774 nr_writes 264444 nr_ops 1185905218 DPDK: Perf test: 1 writer, 7 readers, 1 QSBR variable, 1 QSBR Query, Non-Blocking QSBR check Following numbers include calls to rte_hash functions Cycles per 1 update(online/update/offline): 813407 Cycles per 1 check(start, check): 859679 Both of these tests qsbr rcu in each library using 7 readers and 1 writer. Its a little bit of an apples to oranges comparison, as the tests run using slightly different parameters, and produce different output statistics, but I think they can be somewhat normalized. Primarily the stat that stuck out to me was the DPDK Cycles per 1 update statistic, which I believe is effectively the number of cycles spent in the test / the number of writer updates. On DPDK that number in this test run works out to 813407. In the liburcw test, it reports the total number of ops (cycles), and the number of writes completed within those cycles. If we do the same division there we get 185905218 / 264444 = 4484. I may be misreading something here, but that seems like a pretty significant write side performance improvement over this implementation. Neil > [1] https://liburcu.org/ > [2] http://mails.dpdk.org/archives/dev/2018-November/119875.html > > > RCU libraries that are mature and carried by Linux and BSD distributions. > > Why would we throw another one into DPDK instead of just using whats > > already available, mature and stable? > > > > Neil > >