DPDK patches and discussions
 help / color / mirror / Atom feed
From: Vladyslav Buslov <vladyslav.buslov@harmonicinc.com>
To: <helin.zhang@intel.com>, <jingjing.wu@intel.com>
Cc: <dev@dpdk.org>
Subject: [dpdk-dev] [PATCH] Add missing prefetches to i40e bulk rx path
Date: Thu, 14 Jul 2016 20:27:18 +0300	[thread overview]
Message-ID: <20160714172719.17502-1-vladyslav.buslov@harmonicinc.com> (raw)

Hello,

Recently I tried to use bulk rx function to reduce CPU usage of rte_eth_rx_burst.
However application performance with i40e_recv_pkts_bulk_alloc was significantly worse than with i40e_recv_pkts. (3m less PPS, 0.5 IPC on receiving core)

Quick investigation revealed two problems:
 - First payload cacheline is prefetched in i40e_recv_pkts but not in i40e_recv_pkts_bulk_alloc.
 - Only first line of next mbuf is prefetched during mbuf init in i40e_rx_alloc_bufs. This causes cache miss at setting 'next' field from mbuf cacheline1 to NULL.

Fixing these two small issues significantly reduced CPU time spent in rte_eth_rx_burst and improved PPS compared to both original i40e_recv_pkts_bulk_alloc and i40e_recv_pkts.

Regards,

Vladyslav Buslov (1):
  net/i40e: add additional prefetch instructions for bulk rx

 drivers/net/i40e/i40e_rxtx.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

-- 
2.8.3

             reply	other threads:[~2016-07-14 17:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-14 17:27 Vladyslav Buslov [this message]
2016-07-14 17:27 ` [dpdk-dev] [PATCH] net/i40e: add additional prefetch instructions for bulk rx Vladyslav Buslov
2016-09-14 13:24   ` Ferruh Yigit
2016-10-10 13:25     ` Wu, Jingjing
2016-10-10 17:05       ` Vladyslav Buslov
2016-10-11  8:51         ` Ananyev, Konstantin
2016-10-11  9:24           ` Vladyslav Buslov
2016-10-12  0:04             ` Ananyev, Konstantin
2016-10-13 10:18               ` Bruce Richardson
2016-10-13 10:30                 ` Ananyev, Konstantin
2016-11-15 12:19                   ` Ferruh Yigit
2016-11-15 13:27                     ` Vladyslav Buslov

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=20160714172719.17502-1-vladyslav.buslov@harmonicinc.com \
    --to=vladyslav.buslov@harmonicinc.com \
    --cc=dev@dpdk.org \
    --cc=helin.zhang@intel.com \
    --cc=jingjing.wu@intel.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).