Date: Wed, 2 Oct 1996 13:00:33 +0100 (BST) From: Doug Rabson <dfr@render.com> To: Michael Hancock <michaelh@cet.co.jp> Cc: Doug Rabson <dfr@freefall.freebsd.org>, freebsd-lite2@freefall.freebsd.org Subject: Re: cvs commit: src/sys TODO Message-ID: <Pine.BSF.3.95.961002123950.10204L-100000@minnow.render.com> In-Reply-To: <Pine.SV4.3.93.961002101648.1737A-100000@parkplace.cet.co.jp>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 2 Oct 1996, Michael Hancock wrote: > On Mon, 30 Sep 1996, Doug Rabson wrote: > > > dfr 96/09/30 07:20:31 > > > > Branch: sys LITE2 > > Added: sys TODO > > Log: > > This is a list of stuff that I think needs to be done before the lite2 > > filesystem code is merged into -current. Feel free to add/remove/change > > tasks. > > I noticed we're merging in simple_lock(). I think that it would be a good idea to keep the simple_lock stuff since it seems to have the promise of multithreading the FS code in a future SMP system. It is almost certainly broken in the current tree since it is pretty tricky to test on a uniprocessor. There is some DEBUG code in kern_lock.c which looks as if it might be useful. > > What's the convention for the new arguments to VOP_LOCK for fs' such as > msdosfs? I think the convention is that if you are changing any field in the struct vnode, you should use simple_lock on vp->v_interlock. There are other interlocks which protect the mount list etc. Under no circumstances should any process which holds a simplelock sleep for any reason. Old code which calls VOP_LOCK(vp) typically changes to vn_lock(vp, LK_EXCLUSIVE|LK_RETRY, p) and calls to VOP_UNLOCK(vp) change to VOP_UNLOCK(vp, 0, p) If the caller has already locked vp->v_interlock, it should add the LK_INTERLOCK flag to the call to vn_lock(). If in addition it is prepared to deal with errors, it can omit the LK_RETRY flag. There are other flags which are documented in <sys/lock.h>. -- Doug Rabson, Microsoft RenderMorphics Ltd. Mail: dfr@render.com Phone: +44 171 734 3761 FAX: +44 171 734 6426
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.961002123950.10204L-100000>