From owner-freebsd-arch Sun Jul 2 8: 5:19 2000 Delivered-To: freebsd-arch@freebsd.org Received: from mimer.webgiro.com (mimer.webgiro.com [212.209.29.5]) by hub.freebsd.org (Postfix) with ESMTP id 6DE3537B85A; Sun, 2 Jul 2000 08:05:15 -0700 (PDT) (envelope-from abial@webgiro.com) Received: by mimer.webgiro.com (Postfix, from userid 66) id 6895D2DC0C; Sun, 2 Jul 2000 17:10:59 +0200 (CEST) Received: by mx.webgiro.com (Postfix, from userid 1001) id E8ECD7817; Sun, 2 Jul 2000 17:00:44 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mx.webgiro.com (Postfix) with ESMTP id E6AB810E17; Sun, 2 Jul 2000 17:00:44 +0200 (CEST) Date: Sun, 2 Jul 2000 17:00:44 +0200 (CEST) From: Andrzej Bialecki To: dfr@freebsd.org, jlemon@freebsd.org Cc: freebsd-arch@freebsd.org Subject: UPDATE: Re: Dynamic sysctls, next round (please review) Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 // 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 To: Doug Rabson 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 // 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