Date: Mon, 25 Jan 1999 14:12:02 -0800 (PST) From: Archie Cobbs <archie@whistle.com> To: dfr@nlsystems.com (Doug Rabson) Cc: current@FreeBSD.ORG Subject: Re: Dynamic sysctl registration Message-ID: <199901252212.OAA18030@bubba.whistle.com> In-Reply-To: <Pine.BSF.4.01.9901251726100.59627-100000@herring.nlsystems.com> from Doug Rabson at "Jan 25, 99 05:36:00 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901252212.OAA18030>