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 majord...@freebsd.org
with "unsubscribe freebsd-current" in the body of the message

Reply via email to