From owner-freebsd-net@FreeBSD.ORG Tue Nov 27 13:56:19 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 AF17CED9; Tue, 27 Nov 2012 13:56:19 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mail.ipfw.ru (unknown [IPv6:2a01:4f8:120:6141::2]) by mx1.freebsd.org (Postfix) with ESMTP id 403058FC0C; Tue, 27 Nov 2012 13:56:19 +0000 (UTC) Received: from [2a02:6b8:0:401:222:4dff:fe50:cd2f] (helo=dhcp170-36-red.yandex.net) by mail.ipfw.ru with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.76 (FreeBSD)) (envelope-from ) id 1TdLhS-000G6r-7h; Tue, 27 Nov 2012 17:59:46 +0400 Message-ID: <50B4C5D3.4070701@FreeBSD.org> Date: Tue, 27 Nov 2012 17:53:23 +0400 From: "Alexander V. Chernikov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120627 Thunderbird/13.0.1 MIME-Version: 1.0 To: Gleb Smirnoff Subject: Re: [CFT] ipfw SMP-ready dynamic states References: <50A29F57.6090701@yandex-team.ru> <20121114154741.GE29772@nginx.com> <50B3ED9B.1070500@FreeBSD.org> <20121127055444.GR84121@glebius.int.ru> In-Reply-To: <20121127055444.GR84121@glebius.int.ru> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit 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 13:56:19 -0000 On 27.11.2012 09:54, Gleb Smirnoff wrote: > 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. To be able to enforce state limit per-instance as it currently works. > -- WBR, Alexander