From owner-freebsd-current Sat Aug 3 12:14:05 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id MAA01888 for current-outgoing; Sat, 3 Aug 1996 12:14:05 -0700 (PDT) Received: (from dyson@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id MAA01882; Sat, 3 Aug 1996 12:14:04 -0700 (PDT) From: John Dyson Message-Id: <199608031914.MAA01882@freefall.freebsd.org> Subject: Re: NFS Diskless Dispare... To: dfr@render.com Date: Sat, 3 Aug 1996 12:14:04 -0700 (PDT) Cc: terry@lambert.org, jkh@time.cdrom.com, tony@fit.qut.edu.au, freebsd-current@freebsd.org In-Reply-To: from "Doug Rabson" at Aug 3, 96 05:14:32 pm X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > 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