Skip to content

virtio: one way barrier for packed vring flags

Joyce Kong dpdk-dev 4 versions – Applied

Status from this message: Applied to dpdk-next-virtio/master.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest2 patches 5 repliesApplied
  2. v32 patches 11 repliesSuperseded
  3. v22 patches 2 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v1 RFC2 patches0 repliesSuperseded

Changes in v4 from the cover letter

Use rte_smp_rmb/wmb instead of __atomic_load/store_n on x86 as it reports a better perf(~1.5%), which comes from the saved branch by the compiler. The if and else branch are identical with the smp and cio barriers both defined as compiler barriers on x86.
http://inbox.dpdk.org/dev/E0CBA5A1980F1F408E1F28F9991B5B1D50EFF246@SHSMSX104.ccr.corp.intel.com/

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/2virtio: one way barrier for packed vring desc avail flagsdrivers/net/virtio/virtio_rxtx.c drivers/net/virtio/virtio_user/virtio_user_dev.c drivers/net/virtio/virtqueue.h +2 more+39 -141 reply
2/2virtio: one way barrier for packed vring desc used flagsdrivers/net/virtio/virtio_rxtx.c drivers/net/virtio/virtio_user/virtio_user_dev.c drivers/net/virtio/virtqueue.h +1 more+40 -93 replies

Reviews trailers per patch

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

PatchGavin HuPhil YangMaxime Coquelin
1/2R-b R-b R-b R-b
2/2R-b R-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v4 thread

Cover letter [dpdk-dev] [PATCH v4 0/2] virtio: one way barrier for packed vring flags

This patch set replaces the two-way barriers with C11 one-way barriers for packed vring flags, when the frontend and backend are implemented in software.

By doing vhost-user + virtio-user case benchmarking, 9% performance gain in the RFC2544 test was measured on Thunderx2 platform.[1] And by doing VM2VM case benchmarking, 11% perf gain was measured on Ampere platform.

[1]https://doc.dpdk.org/dts/test_plans/pvp_multi_paths_performance_test_plan.html
PVP test with virtio 1.1 mergeable path

v4:
Use rte_smp_rmb/wmb instead of __atomic_load/store_n on x86 as it reports a better perf(~1.5%), which comes from the saved branch by the compiler. The if and else branch are identical with the smp and cio barriers both defined as compiler barriers on x86.
http://inbox.dpdk.org/dev/E0CBA5A1980F1F408E1F28F9991B5B1D50EFF246@SHSMSX104.ccr.corp.intel.com/

v3:
Wrap C11 one-way barriers and DMA barriers(rte_cio_*) together with an inline fuction.

v2:
Convert RFC to patch.

Joyce Kong (2):
virtio: one way barrier for packed vring desc avail flags
virtio: one way barrier for packed vring desc used flags

 drivers/net/virtio/virtio_rxtx.c                 | 25 +++++++-----
 drivers/net/virtio/virtio_user/virtio_user_dev.c | 10 +++--
 drivers/net/virtio/virtqueue.h                   | 49 +++++++++++++++++++++++-
 lib/librte_vhost/vhost.h                         |  2 +-
 lib/librte_vhost/virtio_net.c                    | 16 ++++----
 5 files changed, 79 insertions(+), 23 deletions(-)
Signature · 1 line
2.7.4