Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1309306

Re: [PATCH] netfilter: nf_conntrack: use safer way to lock all buckets

From Jesper Dangaard Brouer <brouer@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH] netfilter: nf_conntrack: use safer way to lock all buckets
Date 2016-01-14 15:20 +0100
Message-ID <qQQUO-8fS-15@gated-at.bofh.it> (permalink)
References <qNpxL-3Lr-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon,  4 Jan 2016 21:25:46 -0500
Sasha Levin <sasha.levin@oracle.com> wrote:

> When we need to lock all buckets in the connection hashtable we'd attempt to
> lock 1024 spinlocks, which is way more preemption levels than supported by
> the kernel. Furthermore, this behavior was hidden by checking if lockdep is
> enabled, and if it was - use only 8 buckets(!).
> 
> Fix this by using a global lock and synchronize all buckets on it when we
> need to lock them all. This is pretty heavyweight, but is only done when we
> need to resize the hashtable, and that doesn't happen often enough (or at all).
> 
> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
> ---

Looks good to me, and I like the idea.

Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  Author of http://www.iptv-analyzer.org
  LinkedIn: http://www.linkedin.com/in/brouer

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH] netfilter: nf_conntrack: use safer way to lock all buckets Sasha Levin <sasha.levin@oracle.com> - 2016-01-05 03:30 +0100
  RE: [PATCH] netfilter: nf_conntrack: use safer way to lock all  buckets David Laight <David.Laight@ACULAB.COM> - 2016-01-05 12:20 +0100
  Re: [PATCH] netfilter: nf_conntrack: use safer way to lock all  buckets Florian Westphal <fw@strlen.de> - 2016-01-10 02:10 +0100
    Re: [PATCH] netfilter: nf_conntrack: use safer way to lock all  buckets Pablo Neira Ayuso <pablo@netfilter.org> - 2016-01-13 18:00 +0100
      Re: [PATCH] netfilter: nf_conntrack: use safer way to lock all  buckets Sasha Levin <sasha.levin@oracle.com> - 2016-01-13 19:40 +0100
  Re: [PATCH] netfilter: nf_conntrack: use safer way to lock all  buckets Jesper Dangaard Brouer <brouer@redhat.com> - 2016-01-14 15:20 +0100

csiph-web