From owner-svn-src-head@FreeBSD.ORG Wed Mar 25 10:54:12 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CDB1C2C2; Wed, 25 Mar 2015 10:54:12 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 557A4C25; Wed, 25 Mar 2015 10:54:11 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t2PAs9pc009423 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 25 Mar 2015 13:54:09 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t2PAs9ee009422; Wed, 25 Mar 2015 13:54:09 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 25 Mar 2015 13:54:09 +0300 From: Gleb Smirnoff To: Hans Petter Selasky Subject: Re: svn commit: r280495 - head/sys/kern Message-ID: <20150325105409.GS64665@FreeBSD.org> References: <201503250855.t2P8tZFp038467@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201503250855.t2P8tZFp038467@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:54:12 -0000 On Wed, Mar 25, 2015 at 08:55:35AM +0000, Hans Petter Selasky wrote: H> Author: hselasky H> Date: Wed Mar 25 08:55:34 2015 H> New Revision: 280495 H> URL: https://svnweb.freebsd.org/changeset/base/280495 H> H> Log: H> Implement a simple OID number garbage collector. Given the increasing H> number of dynamically created and destroyed SYSCTLs during runtime it H> is very likely that the current new OID number limit of 0x7fffffff can H> be reached. Especially if dynamic OID creation and destruction results H> from automatic tests. Additional changes: H> H> - Optimize the typical use case by decrementing the next automatic OID H> sequence number instead of incrementing it. This saves searching time H> when inserting new OIDs into a fresh parent OID node. H> H> - Add simple check for duplicate non-automatic OID numbers. Why didn't you use alloc_unr(9) for that? -- Totus tuus, Glebius.