Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Jul 1999 01:21:10 -0500
From:      Alan Cox <alc@cs.rice.edu>
To:        Stephen McKay <syssgm@detir.qld.gov.au>
Cc:        Andrew Gallatin <gallatin@cs.duke.edu>, freebsd-current@freebsd.org, dillon@apollo.backplane.com
Subject:   Re: Stuck in "objtrm"
Message-ID:  <19990710012110.W10611@cs.rice.edu>
In-Reply-To: <199907070349.NAA13375@nymph.detir.qld.gov.au>; from Stephen McKay on Wed, Jul 07, 1999 at 01:49:51PM %2B1000
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>

next in thread | previous in thread | raw e-mail | index | archive | help

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




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