From owner-freebsd-net@FreeBSD.ORG Tue Nov 27 05:54:47 2012 Return-Path: Delivered-To: freebsd-net@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 44A3423D; Tue, 27 Nov 2012 05:54:47 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id B6B858FC13; Tue, 27 Nov 2012 05:54:46 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id qAR5sjCN010271; Tue, 27 Nov 2012 09:54:45 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id qAR5si3w010270; Tue, 27 Nov 2012 09:54:44 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 27 Nov 2012 09:54:44 +0400 From: Gleb Smirnoff To: "Alexander V. Chernikov" Subject: Re: [CFT] ipfw SMP-ready dynamic states Message-ID: <20121127055444.GR84121@glebius.int.ru> References: <50A29F57.6090701@yandex-team.ru> <20121114154741.GE29772@nginx.com> <50B3ED9B.1070500@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <50B3ED9B.1070500@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: "Alexander V. Chernikov" , freebsd-ipfw@FreeBSD.org, Luigi Rizzo , "freebsd-net@freebsd.org" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Nov 2012 05:54:47 -0000 On Tue, Nov 27, 2012 at 02:30:51AM +0400, Alexander V. Chernikov wrote: A> On 14.11.2012 19:47, Gleb Smirnoff wrote: A> > On Tue, Nov 13, 2012 at 11:28:23PM +0400, Alexander V. Chernikov wrote: A> > A> So, we can do the following: A> > A> 1) lock increments/decrements via some separate mutex A> > A> 2) do nothing A> > A> 3) take some combined approach: A> > A> > 4) Take it via uma_zone_getcur(ipfw_dyn_rule_zone); A> It acquired zone lock to collect per-cpu item data, but A> uma_zone_set_max() did the trick. A> > A> A> Patch updated: A> * UMA zone is now allocated per-VNET instance Why? This only leads to more waste in allocator. -- Totus tuus, Glebius.