DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tiwei Bie <tiwei.bie@intel.com>
To: dev@dpdk.org, jfreiman@redhat.com
Subject: [dpdk-dev] [RFC 5/6] vhost: minor refinement
Date: Tue, 18 Jul 2017 23:40:20 +0800	[thread overview]
Message-ID: <1500392421-76672-6-git-send-email-tiwei.bie@intel.com> (raw)
In-Reply-To: <1500392421-76672-1-git-send-email-tiwei.bie@intel.com>

Manually prefetch the first desc in dequeue path.

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
---
 lib/librte_vhost/virtio_net.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 0888d2b..08d53d9 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -1259,6 +1259,7 @@ vhost_dequeue_burst_1_1(struct virtio_net *dev, struct vhost_virtqueue *vq,
 
 	vq->last_used_idx = desc_idx;
 	if (likely(i)) {
+		rte_prefetch0(&desc[head_idx & (vq->size - 1)]);
 		for (desc_idx = head_idx + 1;
 		     desc_idx != vq->last_used_idx;
 		     desc_idx++) {
-- 
2.7.4

  parent reply	other threads:[~2017-07-18 15:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-18 15:40 [dpdk-dev] [RFC 0/6] virtio1.1 prototype updates Tiwei Bie
2017-07-18 15:40 ` [dpdk-dev] [RFC 1/6] net/virtio: optimize the rx path Tiwei Bie
2017-07-18 15:40 ` [dpdk-dev] [RFC 2/6] vhost: optimize enqueue path Tiwei Bie
2017-07-18 15:40 ` [dpdk-dev] [RFC 3/6] net/virtio: optimize the tx path Tiwei Bie
2017-07-18 15:40 ` [dpdk-dev] [RFC 4/6] net/virtio: revert the changes in 18dc1b1ac Tiwei Bie
2017-07-18 15:40 ` Tiwei Bie [this message]
2017-07-18 15:40 ` [dpdk-dev] [RFC 6/6] virtio1.1: introduce the DESC_WB flag Tiwei Bie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1500392421-76672-6-git-send-email-tiwei.bie@intel.com \
    --to=tiwei.bie@intel.com \
    --cc=dev@dpdk.org \
    --cc=jfreiman@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).