public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter•org>
To: Eric Dumazet <eric.dumazet@gmail•com>
Cc: Jozsef Kadlecsik <kadlec@blackhole•kfki.hu>,
	Florian Westphal <fw@strlen•de>,
	netfilter-devel@vger•kernel.org, netdev <netdev@vger•kernel.org>,
	Eric Dumazet <edumazet@google•com>,
	syzbot <syzkaller@googlegroups•com>
Subject: Re: [PATCH nf] netfilter: conntrack: serialize hash resizes and cleanups
Date: Tue, 21 Sep 2021 03:51:41 +0200	[thread overview]
Message-ID: <YUk6rWNxqMi37N7K@salvia> (raw)
In-Reply-To: <20210917221556.1162846-1-eric.dumazet@gmail.com>

On Fri, Sep 17, 2021 at 03:15:56PM -0700, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@google•com>
> 
> Syzbot was able to trigger the following warning [1]
> 
> No repro found by syzbot yet but I was able to trigger similar issue
> by having 2 scripts running in parallel, changing conntrack hash sizes,
> and:
> 
> for j in `seq 1 1000` ; do unshare -n /bin/true >/dev/null ; done
> 
> It would take more than 5 minutes for net_namespace structures
> to be cleaned up.
> 
> This is because nf_ct_iterate_cleanup() has to restart everytime
> a resize happened.
> 
> By adding a mutex, we can serialize hash resizes and cleanups
> and also make get_next_corpse() faster by skipping over empty
> buckets.
> 
> Even without resizes in the picture, this patch considerably
> speeds up network namespace dismantles.

Applied, thanks.

      parent reply	other threads:[~2021-09-21  1:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-17 22:15 [PATCH nf] netfilter: conntrack: serialize hash resizes and cleanups Eric Dumazet
2021-09-19  9:20 ` Florian Westphal
2021-09-21  1:51 ` Pablo Neira Ayuso [this message]

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=YUk6rWNxqMi37N7K@salvia \
    --to=pablo@netfilter$(echo .)org \
    --cc=edumazet@google$(echo .)com \
    --cc=eric.dumazet@gmail$(echo .)com \
    --cc=fw@strlen$(echo .)de \
    --cc=kadlec@blackhole$(echo .)kfki.hu \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=netfilter-devel@vger$(echo .)kernel.org \
    --cc=syzkaller@googlegroups$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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