From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Emmerich Subject: [PATCH] prefetch second cacheline of mbufs on alloc Date: Tue, 12 May 2015 01:15:18 +0200 Message-ID: <1431386118-2811-1-git-send-email-emmericp@net.in.tum.de> To: dev@dpdk.org Return-path: 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 ; Tue, 12 May 2015 01:15:26 +0200 (CEST) List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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