Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Jul 2000 17:00:44 +0200 (CEST)
From:      Andrzej Bialecki <abial@webgiro.com>
To:        dfr@freebsd.org, jlemon@freebsd.org
Cc:        freebsd-arch@freebsd.org
Subject:   UPDATE: Re: Dynamic sysctls, next round (please review)
Message-ID:  <Pine.BSF.4.20.0007021654410.53282-100000@mx.webgiro.com>

next in thread | raw e-mail | index | archive | help
Hi,

Ok, I think I solved all bad scenarios (described in the message at the
end). Instead of implementing some complex referencing mechanism, I just
added a possibility to do "safe delete" of context, so that it's possible
to rollback the changes if it fails in the middle.

I tested that creating partially overlapping subtrees, and deleting them
independently works properly.

The new patches are available at the same URL:

	http://www.freebsd.org/~abial/dyn_sysctl.tgz

Please review and send me your comments. Thanks!


Andrzej Bialecki

//  <abial@webgiro.com> WebGiro AB, Sweden (http://www.webgiro.com)
// -------------------------------------------------------------------
// ------ FreeBSD: The Power to Serve. http://www.freebsd.org --------
// --- Small & Embedded FreeBSD: http://www.freebsd.org/~picobsd/ ----

---------- Forwarded message ----------
Date: Thu, 29 Jun 2000 12:19:48 +0200 (CEST)
From: Andrzej Bialecki <abial@webgiro.com>
To: Doug Rabson <dfr@nlsystems.com>
Cc: dfr@freebsd.org, jlemon@freebsd.org
Subject: Re: Dynamic sysctls, next round (please review)


[snip...]

The following scenario will break the reference counting as it is right
now (ref counts in brackets):

* module A creates:
-static_root
	-node1(1)
		-node2(1)
			-leaf1(1)
* module B creates:
		-node2(2)
			-leaf2(1)

Why? Well, perhaps it checks that -node1 already exists...

Now the tree looks like that:
-static_root
	-node1(1)
		-node2(2)
			-leaf1(1)
			-leaf2(1)

* module A wants to free the context:
			-leaf1(0) - free
		-node2(1) - leave
	-node1(0) - free
* module B is left with subtree hanging in void:
-static_root
	NOTHING!
		-node2(1)
			-leaf2(1)

I don't have any good solution for it right now, except to warn users that
they should always hang their subtrees off of static nodes. :-(		

Andrzej Bialecki

//  <abial@webgiro.com> WebGiro AB, Sweden (http://www.webgiro.com)
// -------------------------------------------------------------------
// ------ FreeBSD: The Power to Serve. http://www.freebsd.org --------
// --- Small & Embedded FreeBSD: http://www.freebsd.org/~picobsd/ ----





To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" 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.20.0007021654410.53282-100000>