Thread (133 messages) 133 messages, 11 authors, 2022-12-16

Re: [dpdk-dev] [PATCH v2 8/9] eal: add lcore iterators

From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2020-06-20 02:21:56

On Fri, 19 Jun 2020 18:22:43 +0200
David Marchand [off-list ref] wrote:
+	rte_rwlock_read_lock(&lcore_lock);
I see you converted a spin lock to a reader lock.
Are you sure this is a good idea, although conceptually faster,
the implementation on most cpu's is slower than a simple spin lock.

https://www.kernel.org/doc/htmldocs/kernel-locking/Efficiency.html

	If your code divides neatly along reader/writer lines (as our
	cache code does), and the lock is held by readers for significant
	lengths of time, using these locks can help. They are slightly slower
	than the normal locks though, so in practice rwlock_t is not usually
	worthwhile.

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help