Message ID | 1431386118-2811-1-git-send-email-emmericp@net.in.tum.de (mailing list archive) |
---|---|
State | Rejected, archived |
Delegated to: | Thomas Monjalon |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 70F3D5692; Tue, 12 May 2015 01:15:27 +0200 (CEST) Received: from mail-out1.informatik.tu-muenchen.de (mail-out1.informatik.tu-muenchen.de [131.159.0.8]) by dpdk.org (Postfix) with ESMTP id 8CB622716 for <dev@dpdk.org>; Tue, 12 May 2015 01:15:26 +0200 (CEST) Received: from omanyte.baltikum.net.in.tum.de (omanyte.baltikum.net.in.tum.de [188.95.232.221]) by mail.net.in.tum.de (Postfix) with ESMTPSA id 8B53E1944B46; Tue, 12 May 2015 01:15:23 +0200 (CEST) From: Paul Emmerich <emmericp@net.in.tum.de> To: dev@dpdk.org Date: Tue, 12 May 2015 01:15:18 +0200 Message-Id: <1431386118-2811-1-git-send-email-emmericp@net.in.tum.de> X-Mailer: git-send-email 1.9.1 Subject: [dpdk-dev] [PATCH] prefetch second cacheline of mbufs on alloc X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK <dev.dpdk.org> List-Unsubscribe: <http://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <http://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Commit Message
Paul Emmerich
May 11, 2015, 11:15 p.m. UTC
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(+)
Comments
Please Olivier, What is the status of this patch? 2015-05-12 01:15, Paul Emmerich: > 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); >
Hi Thomas, On 07/20/2015 03:00 AM, Thomas Monjalon wrote: > Please Olivier, > What is the status of this patch? From what I remember, the last mail was a comment from Konstantin on another thread (but same topic): http://dpdk.org/ml/archives/dev/2015-May/017633.html Regards, Olivier > > 2015-05-12 01:15, Paul Emmerich: >> 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); >> > >
Do we need to discuss again the prefetch calls inside DPDK or can we definitely close this kind of request? mbuf: http://dpdk.org/patch/4678/ ethdev: http://dpdk.org/patch/8867/ 2015-07-20 10:02, Olivier MATZ: > Hi Thomas, > > > On 07/20/2015 03:00 AM, Thomas Monjalon wrote: > > Please Olivier, > > What is the status of this patch? > > From what I remember, the last mail was a comment from Konstantin > on another thread (but same topic): > http://dpdk.org/ml/archives/dev/2015-May/017633.html > > > Regards, > Olivier > > > > > > 2015-05-12 01:15, Paul Emmerich: > >> 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); > >> > > > >
On Wed, 15 Feb 2017 09:44:35 +0100, Thomas Monjalon <thomas.monjalon@6wind.com> wrote: > Do we need to discuss again the prefetch calls inside DPDK > or can we definitely close this kind of request? > mbuf: http://dpdk.org/patch/4678/ > ethdev: http://dpdk.org/patch/8867/ > About the mbuf prefetch, I suggest the topic can be closed: The rte_pkt_mbuf_alloc() function is not necessarily called in a place where we will write the second cache line, so the prefetch is not always useful. Having prefetches in generic functions does not look to be a good idea, especially in that case, knowing it's easy to do it in the application. Olivier > > 2015-07-20 10:02, Olivier MATZ: > > Hi Thomas, > > > > > > On 07/20/2015 03:00 AM, Thomas Monjalon wrote: > > > Please Olivier, > > > What is the status of this patch? > > > > From what I remember, the last mail was a comment from Konstantin > > on another thread (but same topic): > > http://dpdk.org/ml/archives/dev/2015-May/017633.html > > > > > > Regards, > > Olivier > > > > > > > > > > 2015-05-12 01:15, Paul Emmerich: > > >> 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); > > >> > > > > > > > >
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);