From: Edward Cree <ecree@solarflare.com>
To: "Björn Töpel" <bjorn.topel@gmail.com>
Cc: Netdev <netdev@vger.kernel.org>,
"Alexei Starovoitov" <ast@kernel.org>,
"Daniel Borkmann" <daniel@iogearbox.net>,
"Björn Töpel" <bjorn.topel@intel.com>, bpf <bpf@vger.kernel.org>,
"Magnus Karlsson" <magnus.karlsson@gmail.com>,
"Karlsson, Magnus" <magnus.karlsson@intel.com>,
"Jonathan Lemon" <jonathan.lemon@gmail.com>
Subject: Re: [RFC PATCH bpf-next 2/4] bpf: introduce BPF dispatcher
Date: Thu, 14 Nov 2019 10:18:55 +0000 [thread overview]
Message-ID: <96811723-ab08-b987-78c7-2c9f2a0a972c@solarflare.com> (raw)
In-Reply-To: <CAJ+HfNiDa912Uwt41_KMv+Z-sGr8fU7s4ncBPiUSx4PPAMQQqQ@mail.gmail.com>
On 14/11/2019 06:29, Björn Töpel wrote:
> On Wed, 13 Nov 2019 at 22:41, Edward Cree <ecree@solarflare.com> wrote:
>> On 13/11/2019 20:47, Björn Töpel wrote:
>> The first-come-first-served model for dispatcher slots might mean that
>> a low-traffic user ends up getting priority while a higher-traffic
>> user is stuck with the retpoline fallback. Have you considered using
>> a learning mechanism, like in my dynamic call RFC [1] earlier this
>> year? (Though I'm sure a better learning mechanism than the one I
>> used there could be devised.)
> My rationale was that this mechanism would almost exclusively be used
> by physical HW NICs using XDP. My hunch was that the number of netdevs
> would be ~4, and typically less using XDP, so a more sophisticated
> mechanism didn't really make sense IMO.
That seems reasonable in most cases, although I can imagine systems with
a couple of four-port boards being a thing. I suppose the netdevs are
likely to all have the same XDP prog, though, and if I'm reading your
code right it seems they'd share a slot in that case.
> However, your approach is more
> generic and doesn't require any arch specific work. What was the push
> back for your work?
Mainly that I couldn't demonstrate a performance benefit from the few
call sites I annotated, and others working in the area felt that
manual annotation wouldn't scale — Nadav Amit had a different approach
[2] that used a GCC plugin to apply a dispatcher on an opt-out basis
to all the indirect calls in the kernel; the discussion on that got
bogged down in interactions between text patching and perf tracing
which all went *waaaay* over my head. AFAICT the static_call series I
was depending on never got merged, and I'm not sure if anyone's still
working on it.
-Ed
[2] https://lkml.org/lkml/2018/12/31/19
next prev parent reply other threads:[~2019-11-14 10:19 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-13 20:47 [RFC PATCH bpf-next 0/4] Introduce xdp_call.h and the BPF dispatcher Björn Töpel
2019-11-13 20:47 ` [RFC PATCH bpf-next 1/4] bpf: teach bpf_arch_text_poke() jumps Björn Töpel
2019-11-13 20:47 ` [RFC PATCH bpf-next 2/4] bpf: introduce BPF dispatcher Björn Töpel
2019-11-13 21:40 ` Edward Cree
2019-11-14 6:29 ` Björn Töpel
2019-11-14 10:18 ` Edward Cree [this message]
2019-11-14 11:21 ` Björn Töpel
2019-11-14 13:58 ` Peter Zijlstra
2019-11-14 12:31 ` Toke Høiland-Jørgensen
2019-11-14 13:03 ` Daniel Borkmann
2019-11-14 13:09 ` Toke Høiland-Jørgensen
2019-11-14 13:56 ` Björn Töpel
2019-11-14 14:55 ` Toke Høiland-Jørgensen
2019-11-14 15:03 ` Björn Töpel
2019-11-14 15:12 ` Toke Høiland-Jørgensen
2019-11-15 0:30 ` Alexei Starovoitov
2019-11-15 7:56 ` Björn Töpel
2019-11-15 21:58 ` Alexei Starovoitov
2019-11-18 10:03 ` Björn Töpel
2019-11-18 19:36 ` Andrii Nakryiko
2019-11-18 20:11 ` Björn Töpel
2019-11-13 20:47 ` [RFC PATCH bpf-next 3/4] xdp: introduce xdp_call Björn Töpel
2019-11-13 20:47 ` [RFC PATCH bpf-next 4/4] i40e: start using xdp_call.h Björn Töpel
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=96811723-ab08-b987-78c7-2c9f2a0a972c@solarflare.com \
--to=ecree@solarflare.com \
--cc=ast@kernel.org \
--cc=bjorn.topel@gmail.com \
--cc=bjorn.topel@intel.com \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=jonathan.lemon@gmail.com \
--cc=magnus.karlsson@gmail.com \
--cc=magnus.karlsson@intel.com \
--cc=netdev@vger.kernel.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).