All of lore.kernel.org
 help / color / mirror / Atom feed
From: Magnus Karlsson <magnus.karlsson@gmail.com>
To: Neal Shukla <nshukla@riotgames.com>
Cc: "Zvi Effron" <zeffron@riotgames.com>,
	"Toke Høiland-Jørgensen" <toke@redhat.com>,
	Xdp <xdp-newbies@vger.kernel.org>,
	"Björn Töpel" <bjorn.topel@gmail.com>,
	"Karlsson, Magnus" <magnus.karlsson@intel.com>,
	"Jesper Dangaard Brouer" <brouer@redhat.com>
Subject: Re: Profiling XDP programs for performance issues
Date: Fri, 9 Apr 2021 08:40:51 +0200	[thread overview]
Message-ID: <CAJ8uoz2tsbpD1OvLLThC=a8O1KNMhHqwWGG9QOUJ0MMKHnzkSg@mail.gmail.com> (raw)
In-Reply-To: <CAJwr_MfPOzpdaM+MhkYVcLdQyc+XWvm=PChrRTrZXATL_X1pbw@mail.gmail.com>

On Fri, Apr 9, 2021 at 1:06 AM Neal Shukla <nshukla@riotgames.com> wrote:
>
> Using perf, we've confirmed that the line mentioned has a 25.58% cache miss
> rate.

Do these hit in the LLC or in DRAM? In any case, your best bet is
likely to prefetch this into your L1/L2. In my experience, the best
way to do this is not to use an explicit prefetch instruction but to
touch/fetch the cache lines you need in the beginning of your
computation and let the fetch latency and the usage of the first cache
line hide the latencies of fetching the others. In your case, touch
both metadata and packet at the same time. Work with the metadata and
other things then come back to the packet data and hopefully the
relevant part will reside in the cache or registers by now. If that
does not work, touch packet number N+1 just before starting with
packet N.

Very general recommendations but hope it helps anyway. How exactly to
do this efficiently is very application dependent.

/Magnus

> On Thu, Apr 8, 2021 at 2:38 PM Zvi Effron <zeffron@riotgames.com> wrote:
> >
> > Apologies for the spam to anyone who received my first response, but
> > it was accidentally sent as HTML and rejected by the mailing list.
> >
> > On Thu, Apr 8, 2021 at 11:20 AM Neal Shukla <nshukla@riotgames.com> wrote:
> > >
> > > System Info:
> > > CPU: Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz
> > > Network Adapter/NIC: Intel X710
> > > Driver: i40e
> > > Kernel version: 5.8.15
> > > OS: Fedora 33
> > >
> >
> > Slight correction, we're actually on the 5.10.10 kernel.
> >
> > --Zvi

  reply	other threads:[~2021-04-09  6:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-08  2:19 Profiling XDP programs for performance issues Neal Shukla
2021-04-08 10:32 ` Toke Høiland-Jørgensen
2021-04-08 18:20   ` Neal Shukla
2021-04-08 21:37     ` Zvi Effron
2021-04-08 23:05       ` Neal Shukla
2021-04-09  6:40         ` Magnus Karlsson [this message]
2021-04-09 10:10           ` Jesper Dangaard Brouer
2021-04-15  1:14             ` Neal Shukla

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='CAJ8uoz2tsbpD1OvLLThC=a8O1KNMhHqwWGG9QOUJ0MMKHnzkSg@mail.gmail.com' \
    --to=magnus.karlsson@gmail.com \
    --cc=bjorn.topel@gmail.com \
    --cc=brouer@redhat.com \
    --cc=magnus.karlsson@intel.com \
    --cc=nshukla@riotgames.com \
    --cc=toke@redhat.com \
    --cc=xdp-newbies@vger.kernel.org \
    --cc=zeffron@riotgames.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.