From: John Fastabend <john.fastabend@gmail.com>
To: "Toke Høiland-Jørgensen" <toke@redhat.com>,
"John Fastabend" <john.fastabend@gmail.com>,
"Björn Töpel" <bjorn.topel@gmail.com>,
netdev@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net
Cc: "Björn Töpel" <bjorn.topel@intel.com>,
bpf@vger.kernel.org, davem@davemloft.net,
jakub.kicinski@netronome.com, hawk@kernel.org,
john.fastabend@gmail.com, magnus.karlsson@intel.com,
jonathan.lemon@gmail.com
Subject: RE: [PATCH bpf-next v2 7/8] xdp: remove map_to_flush and map swap detection
Date: Tue, 07 Jan 2020 19:45:15 -0800 [thread overview]
Message-ID: <5e15504b79ddb_68832ae93d7145c063@john-XPS-13-9370.notmuch> (raw)
In-Reply-To: <87imlnht6k.fsf@toke.dk>
Toke Høiland-Jørgensen wrote:
> John Fastabend <john.fastabend@gmail.com> writes:
>
> > Björn Töpel wrote:
> >> From: Björn Töpel <bjorn.topel@intel.com>
> >>
> >> Now that all XDP maps that can be used with bpf_redirect_map() tracks
> >> entries to be flushed in a global fashion, there is not need to track
> >> that the map has changed and flush from xdp_do_generic_map()
> >> anymore. All entries will be flushed in xdp_do_flush_map().
> >>
> >> This means that the map_to_flush can be removed, and the corresponding
> >> checks. Moving the flush logic to one place, xdp_do_flush_map(), give
> >> a bulking behavior and performance boost.
> >>
> >> Acked-by: Toke Høiland-Jørgensen <toke@redhat.com>
> >> Signed-off-by: Björn Töpel <bjorn.topel@intel.com>
> >> ---
> >
> > __dev_map_flush() still has rcu_read_lock/unlock() around flush_list by
> > this point, assuming I've followed along correctly. Can we drop those
> > now seeing its per CPU and all list ops are per-cpu inside napi context?
>
> Hmm, I guess so? :)
>
> > Two reasons to consider, with this patch dev_map_flush() is always
> > called even if the list is empty so even in TX case without redirect.
> > But probably more important it makes the locking requirements more clear.
> > Could probably be done in a follow up patch but wanted to bring it up.
>
> This series was already merged, but I'll follow up with the non-map
> redirect change. This requires a bit of refactoring anyway, so I can
> incorporate the lock removal into that...
>
> -Toke
>
Ah I was just catching up with email and missed itwas already applied.
I can also submit a few fixup patches no problem for the comments and this.
.John
next prev parent reply other threads:[~2020-01-08 3:45 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-19 6:09 [PATCH bpf-next v2 0/8] Simplify xdp_do_redirect_map()/xdp_do_flush_map() and XDP maps Björn Töpel
2019-12-19 6:09 ` [PATCH bpf-next v2 1/8] xdp: simplify devmap cleanup Björn Töpel
2020-01-07 17:32 ` John Fastabend
2020-01-08 10:08 ` Björn Töpel
2019-12-19 6:10 ` [PATCH bpf-next v2 2/8] xdp: simplify cpumap cleanup Björn Töpel
2019-12-19 6:10 ` [PATCH bpf-next v2 3/8] xdp: fix graze->grace type-o in cpumap comments Björn Töpel
2020-01-07 17:33 ` John Fastabend
2019-12-19 6:10 ` [PATCH bpf-next v2 4/8] xsk: make xskmap flush_list common for all map instances Björn Töpel
2020-01-07 17:54 ` John Fastabend
2020-01-08 10:13 ` Björn Töpel
2020-01-08 15:52 ` John Fastabend
2020-01-08 16:01 ` Toke Høiland-Jørgensen
2019-12-19 6:10 ` [PATCH bpf-next v2 5/8] xdp: make devmap " Björn Töpel
2020-01-07 17:58 ` John Fastabend
2020-01-08 10:16 ` Björn Töpel
2020-01-08 10:23 ` Toke Høiland-Jørgensen
2020-01-08 10:25 ` Björn Töpel
2019-12-19 6:10 ` [PATCH bpf-next v2 6/8] xdp: make cpumap " Björn Töpel
2020-01-07 17:59 ` John Fastabend
2019-12-19 6:10 ` [PATCH bpf-next v2 7/8] xdp: remove map_to_flush and map swap detection Björn Töpel
2020-01-07 18:15 ` John Fastabend
2020-01-07 21:07 ` Toke Høiland-Jørgensen
2020-01-08 3:45 ` John Fastabend [this message]
2020-01-08 10:24 ` Björn Töpel
2019-12-19 6:10 ` [PATCH bpf-next v2 8/8] xdp: simplify __bpf_tx_xdp_map() Björn Töpel
2019-12-19 7:18 ` [PATCH bpf-next v2 0/8] Simplify xdp_do_redirect_map()/xdp_do_flush_map() and XDP maps Jesper Dangaard Brouer
2019-12-20 5:21 ` Alexei Starovoitov
2019-12-20 7:46 ` Jesper Dangaard Brouer
2019-12-20 9:26 ` Jesper Dangaard Brouer
2019-12-20 10:29 ` Toke Høiland-Jørgensen
2020-01-07 11:10 ` Björn Töpel
2020-01-07 11:25 ` Toke Høiland-Jørgensen
2020-01-07 13:05 ` Jesper Dangaard Brouer
2020-01-07 13:27 ` Toke Høiland-Jørgensen
2020-01-07 13:52 ` Jesper Dangaard Brouer
2020-01-07 14:18 ` Toke Høiland-Jørgensen
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=5e15504b79ddb_68832ae93d7145c063@john-XPS-13-9370.notmuch \
--to=john.fastabend@gmail.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=davem@davemloft.net \
--cc=hawk@kernel.org \
--cc=jakub.kicinski@netronome.com \
--cc=jonathan.lemon@gmail.com \
--cc=magnus.karlsson@intel.com \
--cc=netdev@vger.kernel.org \
--cc=toke@redhat.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).