|
From: | Xiao Guangrong |
Subject: | Re: [Qemu-devel] [PATCH 09/12] ring: introduce lockless ring buffer |
Date: | Fri, 29 Jun 2018 15:44:25 +0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 |
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, address@hidden wrote:From: Xiao Guangrong<address@hidden>
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<address@hidden> ---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? ThanksOr 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.
[Prev in Thread] | Current Thread | [Next in Thread] |