Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Aug 1996 12:14:04 -0700 (PDT)
From:      John Dyson <dyson>
To:        dfr@render.com
Cc:        terry@lambert.org, jkh@time.cdrom.com, tony@fit.qut.edu.au, freebsd-current@freebsd.org
Subject:   Re: NFS Diskless Dispare...
Message-ID:  <199608031914.MAA01882@freefall.freebsd.org>
In-Reply-To: <Pine.BSI.3.95.960803163842.1451A-100000@nlsys.demon.co.uk> from "Doug Rabson" at Aug 3, 96 05:14:32 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> 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 :-).

> 
> 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.

John



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199608031914.MAA01882>