From owner-freebsd-current Fri Jul 9 23:21:29 1999 Delivered-To: freebsd-current@freebsd.org Received: from cs.rice.edu (cs.rice.edu [128.42.1.30]) by hub.freebsd.org (Postfix) with ESMTP id E7A7415196 for ; Fri, 9 Jul 1999 23:21:27 -0700 (PDT) (envelope-from alc@cs.rice.edu) Received: (from alc@localhost) by cs.rice.edu (8.9.0/8.9.0) id BAA24899; Sat, 10 Jul 1999 01:21:11 -0500 (CDT) Date: Sat, 10 Jul 1999 01:21:10 -0500 From: Alan Cox To: Stephen McKay Cc: Andrew Gallatin , freebsd-current@freebsd.org, dillon@apollo.backplane.com Subject: Re: Stuck in "objtrm" Message-ID: <19990710012110.W10611@cs.rice.edu> References: <199907021200.WAA06282@nymph.detir.qld.gov.au> <199907060745.RAA12161@nymph.detir.qld.gov.au> <199907061044.UAA14043@nymph.detir.qld.gov.au> <14210.4262.296904.751060@grasshopper.cs.duke.edu> <199907070349.NAA13375@nymph.detir.qld.gov.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=oTHb8nViIGeoXxdp X-Mailer: Mutt 0.95.5us In-Reply-To: <199907070349.NAA13375@nymph.detir.qld.gov.au>; from Stephen McKay on Wed, Jul 07, 1999 at 01:49:51PM +1000 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --oTHb8nViIGeoXxdp Content-Type: text/plain; charset=us-ascii Please try the attached patch. Alan --oTHb8nViIGeoXxdp Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="objhang.patch" Index: vm/vm_object.c =================================================================== RCS file: /home/ncvs/src/sys/vm/vm_object.c,v retrieving revision 1.158 diff -c -r1.158 vm_object.c *** vm_object.c 1999/07/01 19:53:42 1.158 --- vm_object.c 1999/07/10 06:02:51 *************** *** 400,413 **** int s; /* ! * Make sure no one uses us. */ vm_object_set_flag(object, OBJ_DEAD); ! ! /* ! * wait for the pageout daemon to be done with the object ! */ ! vm_object_pip_wait(object, "objtrm"); KASSERT(!object->paging_in_progress, ("vm_object_terminate: pageout in progress")); --- 400,415 ---- int s; /* ! * Atomically wait for the pageout daemon to release the object ! * and mark the object dead. */ + s = splvm(); + while (object->paging_in_progress) { + vm_object_set_flag(object, OBJ_PIPWNT); + tsleep(object, PVM, "objtrm", 0); + } vm_object_set_flag(object, OBJ_DEAD); ! splx(s); KASSERT(!object->paging_in_progress, ("vm_object_terminate: pageout in progress")); --oTHb8nViIGeoXxdp-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message