Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Mar 2000 09:43:38 +0100 (BST)
From:      Doug Rabson <dfr@nlsystems.com>
To:        Andrzej Bialecki <abial@webgiro.com>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Dynamic sysctls - patches for review
Message-ID:  <Pine.BSF.4.21.0003270941530.89245-100000@salmon.nlsystems.com>
In-Reply-To: <Pine.BSF.4.20.0003261710550.42603-100000@mx.webgiro.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 26 Mar 2000, Andrzej Bialecki wrote:

> On Sun, 26 Mar 2000, Doug Rabson wrote:
> 
> > On Sun, 26 Mar 2000, Andrzej Bialecki wrote:
> 
> > > Well, somehow the idea of overlapping subtrees sounds nice and useful
> > > IMHO. Any suggestions how to solve these issues?
> > > 
> > > One possible way to do it would be to keep some ID of the oid's
> > > creator. Then, for nodes they would be deleted when the refcnt goes to 0
> > > (no matter who created them), but for terminals the deletion would succeed
> > > only for the owners. Also, if you create a subtree not from the root of
> > > dynamic tree, the refcnt++ would propagate up the tree as well, and
> > > similarly refcnt-- would propagate on deletion.
> > 
> > This is a reasonable solution. Another would be for dynamic sysctl users
> > to use a 'context' object to record all their edits to the tree which
> > would allow the edits to be backed out without relying on a tree-delete
> > operation.
> 
> Could you explain it further? Do you mean something like a transaction
> log? But this wouldn't work - the operations on the tree can be
> interdependent between users.

I just mean creating an object to hold pointers to all the sysctl nodes
and leaves which were created (or which had their refcounts incremented).
To back out the module's edits, it would just run through the list and
destroy each node/leaf. The destroy procedure would decrement the refcount
and use that to decide when to free the memory.

--
Doug Rabson				Mail:  dfr@nlsystems.com
Nonlinear Systems Ltd.			Phone: +44 181 442 9037




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?Pine.BSF.4.21.0003270941530.89245-100000>