From 0b3a12b83eb2feac881bc220304736c7fc61556a Mon Sep 17 00:00:00 2001 From: phk Date: Sun, 31 Aug 1997 07:32:39 +0000 Subject: Change the 0xdeadb hack to a flag called VDOOMED. Introduce VFREE which indicates that vnode is on freelist. Rename vholdrele() to vdrop(). Create vfree() and vbusy() to add/delete vnode from freelist. Add vfree()/vbusy() to keep (v_holdcnt != 0 || v_usecount != 0) vnodes off the freelist. Generalize vhold()/v_holdcnt to mean "do not recycle". Fix reassignbuf()s lack of use of vhold(). Use vhold() instead of checking v_cache_src list. Remove vtouch(), the vnodes are always vget'ed soon enough after for it to have any measuable effect. Add sysctl debug.freevnodes to keep track of things. Move cache_purge() up in getnewvnodes to avoid race. Decrement v_usecount after VOP_INACTIVE(), put a vhold() on it during VOP_INACTIVE() Unmacroize vhold()/vdrop() Print out VDOOMED and VFREE flags (XXX: should use %b) Reviewed by: dyson --- sys/vm/vm_swap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/vm') diff --git a/sys/vm/vm_swap.c b/sys/vm/vm_swap.c index 6082278..9fc4935 100644 --- a/sys/vm/vm_swap.c +++ b/sys/vm/vm_swap.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)vm_swap.c 8.5 (Berkeley) 2/17/94 - * $Id: vm_swap.c,v 1.42 1997/02/22 09:48:40 peter Exp $ + * $Id: vm_swap.c,v 1.43 1997/03/23 03:37:54 bde Exp $ */ #include @@ -136,7 +136,7 @@ swstrategy(bp) biodone(bp); return; } - VHOLD(sp->sw_vp); + vhold(sp->sw_vp); if ((bp->b_flags & B_READ) == 0) { vp = bp->b_vp; if (vp) { -- cgit v1.1