From owner-freebsd-current Mon Jan 25 14:12:34 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA20565 for freebsd-current-outgoing; Mon, 25 Jan 1999 14:12:34 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from whistle.com (s205m131.whistle.com [207.76.205.131]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA20556 for ; Mon, 25 Jan 1999 14:12:33 -0800 (PST) (envelope-from archie@whistle.com) Received: (from smap@localhost) by whistle.com (8.7.5/8.6.12) id OAA14766; Mon, 25 Jan 1999 14:12:30 -0800 (PST) Received: from bubba.whistle.com( 207.76.205.7) by whistle.com via smap (V2.0) id xma014764; Mon, 25 Jan 99 14:12:02 -0800 Received: (from archie@localhost) by bubba.whistle.com (8.8.7/8.6.12) id OAA18030; Mon, 25 Jan 1999 14:12:02 -0800 (PST) From: Archie Cobbs Message-Id: <199901252212.OAA18030@bubba.whistle.com> Subject: Re: Dynamic sysctl registration In-Reply-To: from Doug Rabson at "Jan 25, 99 05:36:00 pm" To: dfr@nlsystems.com (Doug Rabson) Date: Mon, 25 Jan 1999 14:12:02 -0800 (PST) Cc: current@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Doug Rabson writes: > I've made some changes to sysctl to allow nodes to be declared dynamically > either by loading kld modules which contain SYSCTL declarations or, in > theory, by generating oids from some other kernel data such as the device > tree. > > To recap for those that are interested, the existing scheme uses linker > sets to represent interior nodes of the tree. Each child node has a > pointer in its parent's linker set (contained in the parent's oid_arg1 > field). This is hard to make dynamic because linker sets can't easily be > extended without wastefully allocating and reallocating memory. > > I have changed the code to use an SLIST to store the list of children for > an interior node. This has the advantage that nodes can be easily added > and removed. There is an associated cost (about 8 bytes per node on i386) > which I think is reasonable. All the oids in the kernel (or kld module) > are collected together in a single linker set from which the tree is > constructed by threading the oids onto their parent's list. > > The kernel-user interface is completely unchanged. > > If anyone is interested in seeing diffs (approx 23k), please contact me. I'm interested.. could you email me the diffs? I'm more interested in whether these patches can be committed... ? Have Poul, DG, et. al. seen them? -Archie ___________________________________________________________________________ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message