Date: Sun, 17 Nov 2002 03:47:03 -0800 (PST) From: David Xu <davidxu@FreeBSD.org> To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern kern_thread.c Message-ID: <200211171147.gAHBl3i8068723@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200211171147.gAHBl3i8068723>