diff mbox series

[v2,4/4] vhost: remove useless prefetch for packed ring descriptor

Message ID 20181219082113.24455-5-maxime.coquelin@redhat.com (mailing list archive)
State Accepted, archived
Delegated to: Maxime Coquelin
Headers show
Series vhost: add missing barriers, move prefetching | expand

Checks

Context Check Description
ci/Intel-compilation success Compilation OK

Commit Message

Maxime Coquelin Dec. 19, 2018, 8:21 a.m. UTC
This prefetch does not show any performance improvement.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/virtio_net.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Michael S. Tsirkin Dec. 19, 2018, 3:49 p.m. UTC | #1
On Wed, Dec 19, 2018 at 09:21:13AM +0100, Maxime Coquelin wrote:
> This prefetch does not show any performance improvement.
> 
> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Likely because of the RMB.
Try prefetching the *next* descriptor maybe?

> ---
>  lib/librte_vhost/virtio_net.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
> index a9be633de..4d201a3fd 100644
> --- a/lib/librte_vhost/virtio_net.c
> +++ b/lib/librte_vhost/virtio_net.c
> @@ -1437,8 +1437,6 @@ virtio_dev_tx_packed(struct virtio_net *dev, struct vhost_virtqueue *vq,
>  {
>  	uint16_t i;
>  
> -	rte_prefetch0(&vq->desc_packed[vq->last_avail_idx]);
> -
>  	if (unlikely(dev->dequeue_zero_copy)) {
>  		struct zcopy_mbuf *zmbuf, *next;
>  
> -- 
> 2.17.2
diff mbox series

Patch

diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index a9be633de..4d201a3fd 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -1437,8 +1437,6 @@  virtio_dev_tx_packed(struct virtio_net *dev, struct vhost_virtqueue *vq,
 {
 	uint16_t i;
 
-	rte_prefetch0(&vq->desc_packed[vq->last_avail_idx]);
-
 	if (unlikely(dev->dequeue_zero_copy)) {
 		struct zcopy_mbuf *zmbuf, *next;