vhost: relax full barriers for used idx
Used idx can be synchronized by one-way barrier instead of full write barrier for split vring. Signed-off-by: Joyce Kong <joyce.kong@arm.com> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
This commit is contained in:
parent
9253c34cfb
commit
10b8c36af0
@ -217,8 +217,8 @@ rte_vdpa_relay_vring_used(int vid, uint16_t qid, void *vring_m)
|
|||||||
idx++;
|
idx++;
|
||||||
}
|
}
|
||||||
|
|
||||||
rte_smp_wmb();
|
/* used idx is the synchronization point for the split vring */
|
||||||
vq->used->idx = idx_m;
|
__atomic_store_n(&vq->used->idx, idx_m, __ATOMIC_RELEASE);
|
||||||
|
|
||||||
if (dev->features & (1ULL << VIRTIO_RING_F_EVENT_IDX))
|
if (dev->features & (1ULL << VIRTIO_RING_F_EVENT_IDX))
|
||||||
vring_used_event(s_vring) = idx_m;
|
vring_used_event(s_vring) = idx_m;
|
||||||
|
Loading…
Reference in New Issue
Block a user