[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAADnVQKwnMChzeGaC66A99cHn5szB4hPZaGXq8JAhd8sjrdGeA@mail.gmail.com>
Date: Wed, 23 Oct 2019 10:42:00 -0700
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: "Samudrala, Sridhar" <sridhar.samudrala@...el.com>
Cc: Björn Töpel <bjorn.topel@...il.com>,
Toke Høiland-Jørgensen <toke@...hat.com>,
Jakub Kicinski <jakub.kicinski@...ronome.com>,
Netdev <netdev@...r.kernel.org>,
intel-wired-lan <intel-wired-lan@...ts.osuosl.org>,
"Herbert, Tom" <tom.herbert@...el.com>,
"Fijalkowski, Maciej" <maciej.fijalkowski@...el.com>,
"bpf@...r.kernel.org" <bpf@...r.kernel.org>,
Björn Töpel <bjorn.topel@...el.com>,
"Karlsson, Magnus" <magnus.karlsson@...el.com>
Subject: Re: [Intel-wired-lan] FW: [PATCH bpf-next 2/4] xsk: allow AF_XDP
sockets to receive packets directly from a queue
On Tue, Oct 22, 2019 at 12:06 PM Samudrala, Sridhar
<sridhar.samudrala@...el.com> wrote:
>
> OK. Here is another data point that shows the perf report with the same test but CPU mitigations
> turned OFF. Here bpf_prog overhead goes down from almost (10.18 + 4.51)% to (3.23 + 1.44%).
>
> 21.40% ksoftirqd/28 [i40e] [k] i40e_clean_rx_irq_zc
> 14.13% xdpsock [i40e] [k] i40e_clean_rx_irq_zc
> 8.33% ksoftirqd/28 [kernel.vmlinux] [k] xsk_rcv
> 6.09% ksoftirqd/28 [kernel.vmlinux] [k] xdp_do_redirect
> 5.19% xdpsock xdpsock [.] main
> 3.48% ksoftirqd/28 [kernel.vmlinux] [k] bpf_xdp_redirect_map
> 3.23% ksoftirqd/28 bpf_prog_3c8251c7e0fef8db [k] bpf_prog_3c8251c7e0fef8db
>
> So a major component of the bpf_prog overhead seems to be due to the CPU vulnerability mitigations.
I feel that it's an incorrect conclusion because JIT is not doing
any retpolines (because there are no indirect calls in bpf).
There should be no difference in bpf_prog runtime with or without mitigations.
Also you're running root, so no spectre mitigations either.
This 3% seems like a lot for a function that does few loads that should
hit d-cache and one direct call.
Please investigate why you're seeing this 10% cpu cost when mitigations are on.
perf report/annotate is the best.
Also please double check that you're using the latest perf.
Since bpf performance analysis was greatly improved several versions ago.
I don't think old perf will be showing bogus numbers, but better to
run the latest.
> The other component is the bpf_xdp_redirect_map() codepath.
>
> Let me know if it helps to collect any other data that should further help with the perf analysis.
>
Powered by blists - more mailing lists