mbox series

[v1,0/4] replace smp barriers in virtio with C11 atomic

Message ID 20201221142321.51606-1-joyce.kong@arm.com (mailing list archive)
Headers
Series replace smp barriers in virtio with C11 atomic |

Message

Joyce Kong Dec. 21, 2020, 2:23 p.m. UTC
  This patchset is to replace rte smp barriers in virtio with C11 atomic
built-ins.

The rte_smp_*mb APIs provide full barrier functionality. However, many
use cases do not require full barriers. To support such use cases, DPDK
will adopt C11 barrier semantics and provide wrappers using C11 atomic
built-ins.[1]

With this patch set, under 0.001% acceptable loss with 2 cores on vhost
side and 1 core on virtio side, PVP case(vhost-user + virtio-user) has
6.7% perf uplift for the split in_order path on ThunderX2 platform.

[1] http://code.dpdk.org/dpdk/latest/source/doc/guides/rel_notes/deprecation.rst

Joyce Kong (4):
  net/virtio: remove unnecessary rmb barrier
  net/virtio: replace smp barrier with IO barrier
  net/virtio: replace full barrier with relaxed barrier for Arm platform
  net/virtio: replace full barrier with thread fence

 drivers/net/virtio/virtio_ethdev.c | 10 ++++-----
 drivers/net/virtio/virtqueue.h     | 35 +++++++++++++++---------------
 2 files changed, 22 insertions(+), 23 deletions(-)
  

Comments

Maxime Coquelin Jan. 8, 2021, 9:16 a.m. UTC | #1
On 12/21/20 3:23 PM, Joyce Kong wrote:
> This patchset is to replace rte smp barriers in virtio with C11 atomic
> built-ins.
> 
> The rte_smp_*mb APIs provide full barrier functionality. However, many
> use cases do not require full barriers. To support such use cases, DPDK
> will adopt C11 barrier semantics and provide wrappers using C11 atomic
> built-ins.[1]
> 
> With this patch set, under 0.001% acceptable loss with 2 cores on vhost
> side and 1 core on virtio side, PVP case(vhost-user + virtio-user) has
> 6.7% perf uplift for the split in_order path on ThunderX2 platform.
> 
> [1] http://code.dpdk.org/dpdk/latest/source/doc/guides/rel_notes/deprecation.rst
> 
> Joyce Kong (4):
>   net/virtio: remove unnecessary rmb barrier
>   net/virtio: replace smp barrier with IO barrier
>   net/virtio: replace full barrier with relaxed barrier for Arm platform
>   net/virtio: replace full barrier with thread fence
> 
>  drivers/net/virtio/virtio_ethdev.c | 10 ++++-----
>  drivers/net/virtio/virtqueue.h     | 35 +++++++++++++++---------------
>  2 files changed, 22 insertions(+), 23 deletions(-)
> 

Series applied to dpdk-next-virtio/main.

Thanks,
Maxime