On 06/29/2018 12:23 PM, Michael S. Tsirkin wrote:
On Thu, Jun 28, 2018 at 09:36:00PM +0800, Jason Wang wrote:


On 2018年06月04日 17:55, guangrong.x...@gmail.com wrote:
From: Xiao Guangrong<xiaoguangr...@tencent.com>


Memory barrier is omitted here, please refer to the comment in the code.

(1)https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/kfifo.h
(2)http://dpdk.org/doc/api/rte__ring_8h.html

Signed-off-by: Xiao Guangrong<xiaoguangr...@tencent.com>
---

May I ask why you need a MPSC ring here? Can we just use N SPSC ring for
submitting pages and another N SPSC ring for passing back results?

Thanks

Or just an SPSC ring + a lock.
How big of a gain is lockless access to a trivial structure
like the ring?


Okay, i will give a try.

BTW, we tried to use a global ring + lock for input and lockless ring for input,
the former did not show better performance. But we haven't tried to use global
ring + lock for out yet.

Reply via email to