From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757531AbcASTKC (ORCPT ); Tue, 19 Jan 2016 14:10:02 -0500 Received: from mail.us.es ([193.147.175.20]:41577 "EHLO mail.us.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757317AbcASTJv (ORCPT ); Tue, 19 Jan 2016 14:09:51 -0500 Date: Tue, 19 Jan 2016 20:09:38 +0100 From: Pablo Neira Ayuso To: Sasha Levin Cc: kaber@trash.net, kadlec@blackhole.kfki.hu, davem@davemloft.net, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] netfilter: nf_conntrack: use safer way to lock all buckets Message-ID: <20160119190938.GA25130@salvia> References: <1453163031-31443-1-git-send-email-sasha.levin@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1453163031-31443-1-git-send-email-sasha.levin@oracle.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 18, 2016 at 07:23:51PM -0500, Sasha Levin 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). > > Acked-by: Jesper Dangaard Brouer > Signed-off-by: Sasha Levin Applied, thanks. I'm including the Reviewed-by tag from Florian in this patch.