rte_mempool_ops support "ring_sp_sc" in single thread mode

jiangheng (G) jiangheng14 at huawei.com
Thu Jul 13 06:12:12 CEST 2023


Hi,
Whether rte_mempool_ops need supports the scenario where the producer and consumer are in the same thread?
Currently, "ring_sp_sc" can be used in this scenario, but its dequeue and enqueue functions have memory barriers, which are not required in the same single thread.
In addition, the number of r.prod and r.cons keeps increasing, and the recently released mbuf cannot be reused, which also affects the performance. If the cache is not enabled.

we can refer to mempool cache to implement "ring_single_thread_sp_sc". In this simple scenario, the performance should be improved.

This scenario is common:
Such as mbuf mempool.  dpdk NICs receives a packet, the protocol stack processes and releases the packet. The alloc and release of the mbuf are in the same thread.

If it makes sense, I can offer a patch

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/users/attachments/20230713/ee52a9f7/attachment.htm>


More information about the users mailing list