Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932697Ab0BCToc (ORCPT ); Wed, 3 Feb 2010 14:44:32 -0500 Received: from dallas.jonmasters.org ([72.29.103.172]:52155 "EHLO dallas.jonmasters.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932269Ab0BCTo2 (ORCPT ); Wed, 3 Feb 2010 14:44:28 -0500 Subject: Re: [PATCH] netfilter: per netns nf_conntrack_cachep From: Jon Masters To: Alexey Dobriyan Cc: Patrick McHardy , Eric Dumazet , linux-kernel , netdev , netfilter-devel , "Paul E. McKenney" In-Reply-To: <20100203190948.GA5182@x200> References: <1265108690.2861.118.camel@tonnant> <1265110504.2861.135.camel@tonnant> <1265129192.2861.141.camel@tonnant> <4B685756.8010107@trash.net> <1265130426.2861.158.camel@tonnant> <1265134598.2861.191.camel@tonnant> <4B6870AF.6060109@trash.net> <4B6967BC.600@trash.net> <1265222289.2861.290.camel@tonnant> <20100203190948.GA5182@x200> Content-Type: text/plain Organization: World Organi[sz]ation of Broken Dreams Date: Wed, 03 Feb 2010 14:43:47 -0500 Message-Id: <1265226227.2861.302.camel@tonnant> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 (2.26.3-1.fc11) Content-Transfer-Encoding: 7bit X-SA-Do-Not-Run: Yes X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: jonathan@jonmasters.org X-SA-Exim-Scanned: No (on dallas.jonmasters.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1695 Lines: 44 On Wed, 2010-02-03 at 21:09 +0200, Alexey Dobriyan wrote: > On Wed, Feb 03, 2010 at 01:38:09PM -0500, Jon Masters wrote: > > *). Per namespace cacheing allocation (the cachep bits). We know it's > > still possible for weirdness to happen in the SLAB cache here. > > Tiny race, needs reproducer. Maybe. I think it's worth fixing anyway. > > *). Per namespace hashsize tracking. Existing code corrupts hashtables > > if the global size is changed when there is more than one netns > > I think, no. > Changing hash size will change hashsize for all netns, current and future. Nope. Look at the logic in nf_conntrack_set_hashsize where you iterate over init_net.ct.hash but don't touch other namespaces. So then you go setting nf_conntrack_htable_size and will deference that in accessing other per-namespace hashtables using the wrong size information. > > *). Per namespace expectations. This is for similar reasons to the need > > for multiple hashtables, though I haven't poked at that. > > Expectation cache is not SLAB_DESTROY_BY_RCU, so the logic doesn't > apply, I hope. I'm not sure, I didn't poke at that much yet. But hashtables certainly need fixing unless you can point out where I'm wrong. > > I also think it is necessary to expose net namespace layout > > Not necessary. Why? How am I as a sysadmin supposed to figure out which net namespaces exist on my system, and as a developer, supposed to debug these situations? Jon. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/