DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/5] lib/stack: improve lockfree C11 implementation
@ 2020-09-11 15:29 Steven Lariau
  2020-09-11 15:29 ` [dpdk-dev] [PATCH 1/5] lib/stack: fix inconsistent weak / strong cas Steven Lariau
                   ` (5 more replies)
  0 siblings, 6 replies; 22+ messages in thread
From: Steven Lariau @ 2020-09-11 15:29 UTC (permalink / raw)
  Cc: dev, nd, dharmik.thakkar, Steven Lariau

One implementation of the DPDK stack library is lockfree,
based on C11 memory model for atomics.
Some of these atomic operations use unnecessary memory orders,
that can be relaxed.
This patch relax some of these operations in order to improve
the performance of the stack library.

The patch was tested on several architectures, to ensure that
the implementation is correct, and to measure performance.
Below are the results for a few architectures on multithread stack
lockfree test.
The cycles count is the average number of cycles per item to perform
a bulk push / pop.

$sudo ./builddir/app/dpdk-test
RTE>>stack_lf_perf_autotest
                              difference compared to main
Cycles count on ThunderX2
 2 cores, bulk size =  8:           -15.85%
 2 cores, bulk size = 32:           -04.56%
 4 cores, bulk size =  8:           -05.00%
 4 cores, bulk size = 32:           -04.35%
16 cores, bulk size =  8:           -02.38%
16 cores, bulk size = 32:           -01.88%

                              difference compared to main
Cycles count on N1SDP
 2 cores, batch size =  8:          +00.77%
 2 cores, batch size = 32:          -16.00%

                              difference compared to main
Cycles count on Skylake
 2 cores, bulk size =  8:           -00.18%
 2 cores, bulk size = 32:           -00.95%
 4 cores, bulk size =  8:           -01.19%
 4 cores, bulk size = 32:           +00.64%
16 cores, bulk size =  8:           +01.20%
16 cores, bulk size = 32:           +00.48%

Steven Lariau (5):
  lib/stack: fix inconsistent weak / strong cas
  lib/stack: remove push acquire fence
  lib/stack: remove redundant orderings for list->len
  lib/stack: reload head when pop fails
  lib/stack: remove pop cas release ordering

 lib/librte_stack/rte_stack_lf_c11.h | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2020-09-30 19:15 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-11 15:29 [dpdk-dev] [PATCH 0/5] lib/stack: improve lockfree C11 implementation Steven Lariau
2020-09-11 15:29 ` [dpdk-dev] [PATCH 1/5] lib/stack: fix inconsistent weak / strong cas Steven Lariau
2020-09-21 17:16   ` Eads, Gage
2020-09-11 15:29 ` [dpdk-dev] [PATCH 2/5] lib/stack: remove push acquire fence Steven Lariau
2020-09-21 17:16   ` Eads, Gage
2020-09-11 15:29 ` [dpdk-dev] [PATCH 3/5] lib/stack: remove redundant orderings for list->len Steven Lariau
2020-09-21 17:16   ` Eads, Gage
2020-09-11 15:29 ` [dpdk-dev] [PATCH 4/5] lib/stack: reload head when pop fails Steven Lariau
2020-09-21 17:16   ` Eads, Gage
2020-09-11 15:29 ` [dpdk-dev] [PATCH 5/5] lib/stack: remove pop cas release ordering Steven Lariau
2020-09-21 17:17   ` Eads, Gage
2020-09-25 14:27     ` David Marchand
2020-09-25 17:43 ` [dpdk-dev] [PATCH v2 0/5] lib/stack: improve lockfree C11 implementation Steven Lariau
2020-09-25 17:43   ` [dpdk-dev] [PATCH v2 1/5] lib/stack: fix inconsistent weak / strong cas Steven Lariau
2020-09-28 10:22     ` David Marchand
2020-09-28 15:58       ` Eads, Gage
2020-09-25 17:43   ` [dpdk-dev] [PATCH v2 2/5] lib/stack: remove push acquire fence Steven Lariau
2020-09-25 17:43   ` [dpdk-dev] [PATCH v2 3/5] lib/stack: remove redundant orderings for list->len Steven Lariau
2020-09-25 17:43   ` [dpdk-dev] [PATCH v2 4/5] lib/stack: reload head when pop fails Steven Lariau
2020-09-25 17:43   ` [dpdk-dev] [PATCH v2 5/5] lib/stack: remove pop cas release ordering Steven Lariau
2020-09-25 17:57     ` Eads, Gage
2020-09-30 19:14   ` [dpdk-dev] [PATCH v2 0/5] lib/stack: improve lockfree C11 implementation David Marchand

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git