From owner-freebsd-arch Thu Apr 19 0:47:54 2001 Delivered-To: freebsd-arch@freebsd.org Received: from earth.backplane.com (earth-nat-cw.backplane.com [208.161.114.67]) by hub.freebsd.org (Postfix) with ESMTP id 6DDB537B43E for ; Thu, 19 Apr 2001 00:47:48 -0700 (PDT) (envelope-from dillon@earth.backplane.com) Received: (from dillon@localhost) by earth.backplane.com (8.11.2/8.11.2) id f3J7lG051820; Thu, 19 Apr 2001 00:47:16 -0700 (PDT) (envelope-from dillon) Date: Thu, 19 Apr 2001 00:47:16 -0700 (PDT) From: Matt Dillon Message-Id: <200104190747.f3J7lG051820@earth.backplane.com> To: Julian Elischer Cc: Terry Lambert , arch@FreeBSD.ORG Subject: Re: Found BAD BUG: squashed References: <200104182323.QAA22635@usr07.primenet.com> <3ADE60FB.E7B4AD95@elischer.org> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :I suggest that we define a generic refcount type and implement :basic kernel support for incrementing and decrementing it. : :These can be hand optimised and also be atomic :there are some suggestions for this already... :allowing the type to be a non-simple type :gives the posibility of such debugging support being included. :-- : __--_|\ Julian Elischer I don't think this is a good idea. The best way to get a reference on an object is to have an objet-specific referencing routine. e.g. vget(), vrele(), vm_object_reference(), and so forth. Some of these routines may well already have to obtain some sort of mutex to do their stuff, and doing unnecessary bus-locked instructions on top of that would be, well, unnecessary. I think it is best to leave the matter up to the individual referencing/dereferencing procedures. Nobody outside those specific routines should ever be manipulating a structure's ref count anyway. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message