numam-dpdk/lib/librte_ring
Morten Brørup 4b7284a71f ring: optimize empty test
Testing if the ring is empty is as simple as comparing the producer and
consumer pointers.

In theory, this optimization reduces the number of potential cache misses
from 3 to 2 by not having to read r->mask in rte_ring_count().

The modification of this function were also discussed in the RFC here:
https://mails.dpdk.org/archives/dev/2020-April/165752.html

Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2020-07-01 11:46:09 +02:00
..
Makefile ring: introduce peek style API 2020-04-21 12:52:55 +02:00
meson.build ring: introduce peek style API 2020-04-21 12:52:55 +02:00
rte_ring_c11_mem.h ring/c11: relax ordering for load and store of the head 2018-11-13 17:00:58 +01:00
rte_ring_core.h ring: introduce HTS ring mode 2020-04-21 12:52:55 +02:00
rte_ring_elem.h ring: cleanup coding style 2020-07-01 11:46:09 +02:00
rte_ring_generic.h ring: enforce reading tail before slots 2019-03-28 01:22:04 +01:00
rte_ring_hts_c11_mem.h ring: introduce HTS ring mode 2020-04-21 12:52:55 +02:00
rte_ring_hts.h ring: cleanup coding style 2020-07-01 11:46:09 +02:00
rte_ring_peek_c11_mem.h ring: fix tail in peek API for ST mode 2020-07-01 10:41:19 +02:00
rte_ring_peek.h ring: fix build for gcc O1 optimization 2020-05-11 19:20:54 +02:00
rte_ring_rts_c11_mem.h ring: introduce RTS ring mode 2020-04-21 12:52:55 +02:00
rte_ring_rts.h ring: cleanup coding style 2020-07-01 11:46:09 +02:00
rte_ring_version.map ring: support configurable element size 2020-01-19 19:32:48 +01:00
rte_ring.c ring: cleanup coding style 2020-07-01 11:46:09 +02:00
rte_ring.h ring: optimize empty test 2020-07-01 11:46:09 +02:00