Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 May 1997 13:14:47 +0100 (BST)
From:      Doug Rabson <dfr@nlsystems.com>
To:        Poul-Henning Kamp <phk@dk.tfs.com>
Cc:        current@freebsd.org
Subject:   Re: vnode->v_usage 
Message-ID:  <Pine.BSF.3.95q.970502131159.331E-100000@herring.nlsystems.com>
In-Reply-To: <5321.862569821@critter>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 2 May 1997, Poul-Henning Kamp wrote:

> 
> >I don't have any performance numbers but it seems to work fine.  I think
> >the cache should just call vtouch for all vnodes and not check the usage
> >count.
> OK.
> 
> >Also vtouch should take the v_interlock simple_lock before reading
> >the v_usecount field as specified by vnode.h.
> 
> Ok, now I'm in doubt here...  Which of these two places are the
> correct place to release the interlock, I've marked the candidates
> with XXX, I pressume the later, right ?

I think that you don't need the v_interlock for using v_freelist so
probably releasing it earlier is better.  Maybe something like:

	int usecount;
	simple_lock(&vp->v_interlock);
	usecount = vp->v_usecount;
	simple_unlock(&vp->v_interlock);
	if (usecount)
		...
	...


--
Doug Rabson				Mail:  dfr@nlsystems.com
Nonlinear Systems Ltd.			Phone: +44 181 951 1891




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95q.970502131159.331E-100000>