Re: [PATCH 09/12] ring: introduce lockless ring buffer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





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.xiao@xxxxxxxxx wrote:
From: Xiao Guangrong<xiaoguangrong@xxxxxxxxxxx>


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<xiaoguangrong@xxxxxxxxxxx>
---

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.



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux