From owner-cvs-all Sun Nov 17 3:49:54 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 012C137B401; Sun, 17 Nov 2002 03:49:51 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BC0A943E88; Sun, 17 Nov 2002 03:49:50 -0800 (PST) (envelope-from davidxu@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id gAHBl3mV068724; Sun, 17 Nov 2002 03:47:03 -0800 (PST) (envelope-from davidxu@repoman.freebsd.org) Received: (from davidxu@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id gAHBl3i8068723; Sun, 17 Nov 2002 03:47:03 -0800 (PST) Message-Id: <200211171147.gAHBl3i8068723@repoman.freebsd.org> From: David Xu Date: Sun, 17 Nov 2002 03:47:03 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern kern_thread.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG davidxu 2002/11/17 03:47:03 PST Modified files: sys/kern kern_thread.c Log: 1.Add sysctls to control KSE resource allocation. kern.threads.max_threads_per_proc kern.threads.max_groups_per_proc 2.Temporary disable borrower thread stash itself as owner thread's spare thread in thread_exit(). there is a race between owner thread and borrow thread: an owner thread may allocate a spare thread as this: if (td->td_standin == NULL) td->standin = thread_alloc(); but thread_alloc() can block the thread, then a borrower thread would possible stash it self as owner's spare thread in thread_exit(), after owner is resumed, result is a thread leak in kernel, double check in owner can avoid the race, but it may be ugly and not worth to do. Revision Changes Path 1.61 +30 -8 src/sys/kern/kern_thread.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message