From owner-freebsd-current Tue Oct 15 22:02:23 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id WAA08508 for current-outgoing; Tue, 15 Oct 1996 22:02:23 -0700 (PDT) Received: from dyson.iquest.net ([198.70.144.127]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id WAA08499 for ; Tue, 15 Oct 1996 22:02:19 -0700 (PDT) Received: (from root@localhost) by dyson.iquest.net (8.7.5/8.6.9) id AAA00379; Wed, 16 Oct 1996 00:01:39 -0500 (EST) From: "John S. Dyson" Message-Id: <199610160501.AAA00379@dyson.iquest.net> Subject: Need help testing this maybe NFS fix To: pst@jnx.com, joerg_wunsch@uriah.heep.sax.de, jdp@polstra.com, current@freebsd.org Date: Wed, 16 Oct 1996 00:01:39 -0500 (EST) Cc: karl@mcs.net Reply-To: dyson@freebsd.org X-Mailer: ELM [version 2.4 PL24 ME8] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk During the rundown of forcibly dismounted NFS filesystems, there is some sloppyness in the handling of the VM objects associated with the files on the filesystems. Included with this message is a patch file that fixes that problem, and also improves the swapping algorithm by making processes that have been waken up from a sleep and who are swapped out eligible immediately for being swapped in. The main reason for this mailing is to get some feedback on a perspective NFS fix, and the swapping fix is only a side-effect of my current tree... Please let me know as soon as you can the positive or negative outcomes of running with this code... Thanks!!! John Index: kern/kern_synch.c =================================================================== RCS file: /local/home/ncvs/src/sys/kern/kern_synch.c,v retrieving revision 1.25 diff -r1.25 kern_synch.c 463a464 > p->p_flag |= P_SWAPINREQ; 508a510 > p->p_flag |= P_SWAPINREQ; 627c629,630 < if ((p->p_flag & P_INMEM) == 0) --- > if ((p->p_flag & P_INMEM) == 0) { > p->p_flag |= P_SWAPINREQ; 628a632 > } Index: kern/vfs_subr.c =================================================================== RCS file: /local/home/ncvs/src/sys/kern/vfs_subr.c,v retrieving revision 1.61 diff -r1.61 vfs_subr.c 982c982,983 < if ((vp->v_usecount == 1) && vp->v_object) { --- > if (vp->v_object && (vp->v_object->flags & OBJ_VFS_REF)) { > vm_object_reference(vp->v_object); 983a985,986 > vp->v_object->flags &= ~OBJ_VFS_REF; > vm_object_deallocate(vp->v_object); 993a997 > 1151a1156,1160 > > if (vp->v_object) { > vp->v_object->flags |= OBJ_VNODE_GONE; > } > Index: sys/proc.h =================================================================== RCS file: /local/home/ncvs/src/sys/sys/proc.h,v retrieving revision 1.29 diff -r1.29 proc.h 217a218 > #define P_SWAPINREQ 0x80000 /* Swapin request due to wakeup */ Index: vm/vm_glue.c =================================================================== RCS file: /local/home/ncvs/src/sys/vm/vm_glue.c,v retrieving revision 1.54 diff -r1.54 vm_glue.c 322c322,325 < pri = p->p_swtime + p->p_slptime - p->p_nice * 8; --- > pri = p->p_swtime + p->p_slptime; > if ((p->p_flag & P_SWAPINREQ) == 0) { > pri -= p->p_nice * 8; > } 337c340 < * Nothing to do, back to sleep --- > * Nothing to do, back to sleep. 342a346,347 > p->p_flag &= ~P_SWAPINREQ; > Index: vm/vm_object.h =================================================================== RCS file: /local/home/ncvs/src/sys/vm/vm_object.h,v retrieving revision 1.31 diff -r1.31 vm_object.h 135a136 > #define OBJ_VNODE_GONE 0x0800 /* vnode is gone */ Index: vm/vnode_pager.c =================================================================== RCS file: /local/home/ncvs/src/sys/vm/vnode_pager.c,v retrieving revision 1.64 diff -r1.64 vnode_pager.c 616a617,618 > if (object->flags & OBJ_VNODE_GONE) > return VM_PAGER_ERROR; 859a862,865 > > if (object->flags & OBJ_VNODE_GONE) > return VM_PAGER_ERROR; >