From owner-freebsd-current Sat Dec 14 17:10:41 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 87C2837B401; Sat, 14 Dec 2002 17:10:39 -0800 (PST) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2A89143E4A; Sat, 14 Dec 2002 17:10:39 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.12.5/8.12.5) with ESMTP id gBF1AcOM060180; Sat, 14 Dec 2002 17:10:39 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.12.5/8.12.5/Submit) id gBF1AcB6060179; Sat, 14 Dec 2002 17:10:38 -0800 (PST) (envelope-from dillon) Date: Sat, 14 Dec 2002 17:10:38 -0800 (PST) From: Matthew Dillon Message-Id: <200212150110.gBF1AcB6060179@apollo.backplane.com> To: Jake Burkholder , "Brian F. Feldman" , John Baldwin , Kris Kennaway , current@FreeBSD.ORG, alpha@FreeBSD.ORG Subject: Re: UMA panic under load References: <200212150037.gBF0bVSM014040@green.bikeshed.org> <20021214201446.F93389@locore.ca> <200212150105.gBF15LiN060144@apollo.backplane.com> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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