Skip to content

replace smp barriers in vhost with C11 atomic

Joyce Kong dpdk-dev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8examples/vhost: relax memory ordering when enqueue/dequeueexamples/vhost/virtio_net.c+4 -81 reply
2/8examples/vhost_blk: replace smp with thread fenceexamples/vhost_blk/vhost_blk.c+4 -41 reply
3/8vhost: remove unnecessary smp barrier for desc flagslib/librte_vhost/virtio_net.c+0 -31 reply
4/8vhost: remove unnecessary smp barrier for avail idxlib/librte_vhost/virtio_net.c+2 -51 reply
5/8vhost: relax full barriers for desc flagslib/librte_vhost/virtio_net.c+3 -21 reply
6/8vhost: relax full barriers for used idxlib/librte_vhost/vdpa.c+2 -21 reply
7/8vhost: replace smp with thread fence for packed vringlib/librte_vhost/virtio_net.c+5 -41 reply
8/8vhost: replace smp with thread fence for control pathlib/librte_vhost/vhost.c lib/librte_vhost/vhost.h lib/librte_vhost/vhost_user.c +1 more+14 -141 reply

Reviews trailers per patch

All 8 patches have a Reviewed-by or Acked-by.

PatchRuifeng WangMaxime Coquelin
1/8R-b R-b
2/8R-b
3/8R-b R-b
4/8R-b R-b
5/8R-b R-b
6/8R-b R-b
7/8R-b R-b
8/8R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [dpdk-dev] [PATCH v1 0/8] replace smp barriers in vhost with C11 atomic

This patchset is to replace rte smp barriers in vhost 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 patchset, PVP case(vhost-user + virtio-user) has 9.8% perf uplift for the split in_order path and no perf degradation for the packed in_order path under 0.001% acceptable loss on ThunderX2 platform.

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

Joyce Kong (8):
examples/vhost: relax memory ordering when enqueue/dequeue examples/vhost_blk: replace smp with thread fence
vhost: remove unnecessary smp barrier for desc flags
vhost: remove unnecessary smp barrier for avail idx
vhost: relax full barriers for desc flags
vhost: relax full barriers for used idx
vhost: replace smp with thread fence for packed vring
vhost: replace smp with thread fence for control path

 examples/vhost/virtio_net.c    | 12 ++++--------
 examples/vhost_blk/vhost_blk.c |  8 ++++----
 lib/librte_vhost/vdpa.c        |  4 ++--
 lib/librte_vhost/vhost.c       | 18 +++++++++---------
 lib/librte_vhost/vhost.h       |  6 +++---
 lib/librte_vhost/vhost_user.c  |  2 +-
 lib/librte_vhost/virtio_net.c  | 26 +++++++++++---------------
 7 files changed, 34 insertions(+), 42 deletions(-)
Signature · 1 line
2.29.2