DPDK patches and discussions
 help / color / mirror / Atom feed
From: Paul Emmerich <emmericp@net.in.tum.de>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] prefetch second cacheline of mbufs on alloc
Date: Tue, 12 May 2015 01:15:18 +0200	[thread overview]
Message-ID: <1431386118-2811-1-git-send-email-emmericp@net.in.tum.de> (raw)

this improves the throughput of a simple tx-only application by 11% in
the full-featured ixgbe tx path and by 14% in the simple tx path.
---
 lib/librte_mbuf/rte_mbuf.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index ab6de67..f6895b4 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -538,6 +538,7 @@ static inline struct rte_mbuf *__rte_mbuf_raw_alloc(struct rte_mempool *mp)
 	if (rte_mempool_get(mp, &mb) < 0)
 		return NULL;
 	m = (struct rte_mbuf *)mb;
+	rte_prefetch0(&m->cacheline1);
 	RTE_MBUF_ASSERT(rte_mbuf_refcnt_read(m) == 0);
 	rte_mbuf_refcnt_set(m, 1);
 	return (m);
-- 
1.9.1

             reply	other threads:[~2015-05-11 23:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-11 23:15 Paul Emmerich [this message]
2015-07-20  1:00 ` Thomas Monjalon
2015-07-20  8:02   ` Olivier MATZ
2017-02-15  8:44     ` Thomas Monjalon
2017-02-16 15:16       ` Olivier Matz

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=1431386118-2811-1-git-send-email-emmericp@net.in.tum.de \
    --to=emmericp@net.in.tum.de \
    --cc=dev@dpdk.org \
    /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).