From owner-cvs-all Fri Jan 3 11:29:52 2003 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6D79D37B401; Fri, 3 Jan 2003 11:29:50 -0800 (PST) Received: from canning.wemm.org (canning.wemm.org [192.203.228.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2564343E4A; Fri, 3 Jan 2003 11:29:50 -0800 (PST) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by canning.wemm.org (Postfix) with ESMTP id 0FC392A7EA; Fri, 3 Jan 2003 11:29:50 -0800 (PST) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: "Alan L. Cox" Cc: John Baldwin , Nate Lawson , cvs-committers@freebsd.org, cvs-all@freebsd.org, Alan Cox Subject: Re: cvs commit: src/sys/nfsclient nfs_vnops.c In-Reply-To: <3E14985A.35AB67F4@imimic.com> Date: Fri, 03 Jan 2003 11:29:50 -0800 From: Peter Wemm Message-Id: <20030103192950.0FC392A7EA@canning.wemm.org> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG "Alan L. Cox" wrote: > John Baldwin wrote: > > ... > > Unless you use M_NOWAIT (highly undesirable in mose cases), you need to > > not hold locks across malloc() anyways as it can sleep. One should be > > able to hold locks across free() without problems however. I would rather > > require callers of the code in question to hold Giant for now rather than > > add in hacks that have to be cleaned up later on. > > > > In general, yes. The vnode interlock is, however, a special case. Any > form of malloc() or free() while holding a vnode interlock will cause a > reversal. This stems from the intertwining of vm objects and vnodes. > > Regards, > Alan > > P.S. If someone knows a good place to document this, please do. One thing that I miss from my (ancient?) Amiga days is Autodoc. It was a formalized way of having docs embedded with the code and having them mined with a tool and collected into coherent man-page-like docs. I dont remember the syntax, but I sort of recall that you could add things to arbitary sections on the fly. ie: you could add a comment block that was marked as something to go into the malloc "BUGS" section.. or whatever. This had the advantage that the docs were readily available in *both* places where they were needed.. ie: in a reference man page, and with the code. And it had the advantage that it was less likely to go stale. Ahh, the good old days (TM)... Cheers, -Peter -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message