Date: Fri, 03 Jan 2003 11:29:50 -0800 From: Peter Wemm <peter@wemm.org> To: "Alan L. Cox" <alc@imimic.com> Cc: John Baldwin <jhb@FreeBSD.org>, Nate Lawson <nate@root.org>, cvs-committers@freebsd.org, cvs-all@freebsd.org, Alan Cox <alc@FreeBSD.org> Subject: Re: cvs commit: src/sys/nfsclient nfs_vnops.c Message-ID: <20030103192950.0FC392A7EA@canning.wemm.org> In-Reply-To: <3E14985A.35AB67F4@imimic.com>
next in thread | previous in thread | raw e-mail | index | archive | help
"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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030103192950.0FC392A7EA>