Date: Sat, 14 Dec 2002 17:10:38 -0800 (PST) From: Matthew Dillon <dillon@apollo.backplane.com> To: Jake Burkholder <jake@locore.ca>, "Brian F. Feldman" <green@FreeBSD.ORG>, John Baldwin <jhb@FreeBSD.ORG>, Kris Kennaway <kris@obsecurity.org>, current@FreeBSD.ORG, alpha@FreeBSD.ORG Subject: Re: UMA panic under load Message-ID: <200212150110.gBF1AcB6060179@apollo.backplane.com> References: <XFMail.20021212113400.jhb@FreeBSD.org> <200212150037.gBF0bVSM014040@green.bikeshed.org> <20021214201446.F93389@locore.ca> <200212150105.gBF15LiN060144@apollo.backplane.com>
next in thread | previous in thread | raw e-mail | index | archive | help
What about something like this. If the vm_refcnt is still being
decremented too early, could it be moved to just before the thread_exit()
call?
-Matt
Index: kern/kern_exit.c
===================================================================
RCS file: /home/ncvs/src/sys/kern/kern_exit.c,v
retrieving revision 1.187
diff -u -r1.187 kern_exit.c
--- kern/kern_exit.c 10 Dec 2002 02:33:44 -0000 1.187
+++ kern/kern_exit.c 15 Dec 2002 01:08:21 -0000
@@ -288,7 +288,7 @@
* Can't free the entire vmspace as the kernel stack
* may be mapped within that space also.
*/
- if (--vm->vm_refcnt == 0) {
+ if (vm->vm_refcnt == 1) {
if (vm->vm_shm)
shmexit(p);
vm_page_lock_queues();
@@ -298,7 +298,9 @@
(void) vm_map_remove(&vm->vm_map, vm_map_min(&vm->vm_map),
vm_map_max(&vm->vm_map));
vm->vm_freer = p;
+ KASSERT(vm->vm_refcnt == 1, ("expected vm_refcnt of 1"));
}
+ --vm->vm_refcnt;
sx_xlock(&proctree_lock);
if (SESS_LEADER(p)) {
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?200212150110.gBF1AcB6060179>
