Skip to content

netfilter: speed up netns cleanup

Florian Westphal netfilter-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3netfilter: batch synchronize_net calls during hook unregisternet/netfilter/core.c+40 -60 replies
2/3netfilter: nf_log: don't call synchronize_rcu in nf_log_unsetnet/netfilter/nf_log.c+0 -11 reply
3/3netfilter: nf_queue: only call synchronize_net twice if nf_queue is activeinclude/net/netfilter/nf_queue.h net/netfilter/core.c net/netfilter/nf_internals.h +2 more+27 -240 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH nf-next 0/3] netfilter: speed up netns cleanup

low hanging fruits to speed up netns cleanup in netfilter. We're way too happy to issue expensive synchronize_rcu() all over the place.

On my test vm 8 processes doing 32 unshare each finish in ~3 minutes, with these patches it gets down to 40 seconds.

We could probably further improve this.

 include/net/netfilter/nf_queue.h |    3 --
 net/netfilter/core.c             |   55 ++++++++++++++++++++++++++++++++-------
 net/netfilter/nf_internals.h     |    2 -
 net/netfilter/nf_log.c           |    1 
 net/netfilter/nf_queue.c         |    7 +++-
 net/netfilter/nfnetlink_queue.c  |   18 +++++-------
 6 files changed, 61 insertions(+), 25 deletions(-)