Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Aug 1996 12:08:02 +0100 (BST)
From:      Doug Rabson <dfr@nlsys.demon.co.uk>
To:        John Dyson <dyson@freefall.freebsd.org>
Cc:        dfr@render.com, terry@lambert.org, jkh@time.cdrom.com, tony@fit.qut.edu.au, freebsd-current@freebsd.org
Subject:   Re: NFS Diskless Dispare...
Message-ID:  <Pine.BSI.3.95.960804120452.221A-100000@nlsys.demon.co.uk>
In-Reply-To: <199608031914.MAA01882@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 3 Aug 1996, John Dyson wrote:

> > 
> > I just grepped for uses of VOP_LOCK in the kernel and there seem to be a
> > few places in the vm system which appear to be using the vnode lock to
> > protect critical sections of code.  Have a look at vm_object_terminate()
> > and vm_object_page_clean() and tell me what would happen if the VOP_LOCK
> > is not exclusive.
> > 
> Don't do a vm_object_page_clean if VOP_LOCK is not exclusive :-).  Don't
> even think about it...  I sure don't want to :-).

Well NFS' VOP_LOCK is certainly not exclusive, so is that going to be a
possible cause of nfs's instability?

> 
> > 
> > You have to start reusing vnodes sometime.  Whether it means reusing them
> > within a filesystem or across a global pool, it has to happen.  Even
> > reusing a vnode within a filesystem would involve something similar to
> > vclean() surely.  I don't understand the VM system well enough to judge
> > whether dropping a few valid pages from old vnodes is a real problem in
> > performance terms.
> > 
> If the vnode is on the free queue, there had better not be any processes
> using it at the time (the vm_object holds a reference.)  If you need to
> get a free vnode, you should probably first check the vnode free list
> and then perhaps try to check the cached VM objects.  Vnode backed
> cached VM objects should be able to be terminated at any time (in
> process context.)  A side-effect of the object termination is that the
> vnode will be pretty much available for re-use.

I think everything in the system is pretty clean in that respect.
Everyone calls vget() to reactivate cached vnodes and checks the return
value to make sure it is still ok.  I am pretty sure nothing tries to use
a vnode with a zero v_usecount.

--
Doug Rabson				Mail:  dfr@nlsys.demon.co.uk
					Phone: +44 181 951 1891




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSI.3.95.960804120452.221A-100000>