DPDK usage discussions
 help / color / mirror / Atom feed
From: "Van Haaren, Harry" <harry.van.haaren@intel.com>
To: Dell Will <coolwilled@hotmail.com>, users <users@dpdk.org>
Subject: Re: [dpdk-users] Why not prefetch the second cache line of struct rte_mbuf for better performance ?
Date: Tue, 26 Mar 2019 10:53:48 +0000	[thread overview]
Message-ID: <E923DB57A917B54B9182A2E928D00FA67580A0C4@IRSMSX102.ger.corp.intel.com> (raw)
In-Reply-To: <TY2PR04MB3808A8797DBB532510FDE6EDDF5F0@TY2PR04MB3808.apcprd04.prod.outlook.com>

> -----Original Message-----
> From: users [mailto:users-bounces@dpdk.org] On Behalf Of Dell Will
> Sent: Tuesday, March 26, 2019 9:04 AM
> To: users <users@dpdk.org>
> Subject: [dpdk-users] Why not prefetch the second cache line of struct
> rte_mbuf for better performance ?
> 
> Hello, everybody

Hi,

> I find that many codes in DPDK only prefetch the first cache line of struct
> rte_mbuf.
> The struct rte_mbuf has 2 cache lines.
> Why not prefetch the second line ?

A reason that cache-line 2 is not always prefetched is that it is not
always going to be used.

For example, the packet RX routines modify only the 1-st cache line, and do
not require the 2nd to be available.


> Is it hinted that the CPU (x64 or ARM) always automatically prefetch the
> next immediately followed cache line ?

Some details on x86-64 prefetchers here, particularly the "Adjacent Cache-Line Prefetch" is of interest;
https://software.intel.com/en-us/articles/optimizing-application-performance-on-intel-coret-microarchitecture-using-hardware-implemented-prefetchers

[Side note, x64 is actually a different architecture than x86-64].


> Thanks a lot !

Hope that helps, -Harry

      reply	other threads:[~2019-03-26 10:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-26  9:03 Dell Will
2019-03-26 10:53 ` Van Haaren, Harry [this message]

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=E923DB57A917B54B9182A2E928D00FA67580A0C4@IRSMSX102.ger.corp.intel.com \
    --to=harry.van.haaren@intel.com \
    --cc=coolwilled@hotmail.com \
    --cc=users@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).