On Fri, 19 Jun 2020 18:22:43 +0200
David Marchand <david.march...@redhat.com> 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.


Reply via email to