From owner-cvs-all Tue Oct 8 19:33:39 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 F0E6737B401; Tue, 8 Oct 2002 19:33:37 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8BF7543E3B; Tue, 8 Oct 2002 19:33:37 -0700 (PDT) (envelope-from julian@FreeBSD.org) Received: from freefall.freebsd.org (julian@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id g992XbCo010874; Tue, 8 Oct 2002 19:33:37 -0700 (PDT) (envelope-from julian@freefall.freebsd.org) Received: (from julian@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id g992XbVF010873; Tue, 8 Oct 2002 19:33:37 -0700 (PDT) Message-Id: <200210090233.g992XbVF010873@freefall.freebsd.org> From: Julian Elischer Date: Tue, 8 Oct 2002 19:33:37 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/ddb db_ps.c src/sys/i386/i386 trap.c vm_machdep.c src/sys/kern init_main.c kern_condvar.c kern_exit.c kern_fork.c kern_proc.c kern_switch.c kern_synch.c kern_thread.c src/sys/sys proc.h 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 julian 2002/10/08 19:33:37 PDT Modified files: sys/ddb db_ps.c sys/i386/i386 trap.c vm_machdep.c sys/kern init_main.c kern_condvar.c kern_exit.c kern_fork.c kern_proc.c kern_switch.c kern_synch.c kern_thread.c sys/sys proc.h Log: Round out the facilty for a 'bound' thread to loan out its KSE in specific situations. The owner thread must be blocked, and the borrower can not proceed back to user space with the borrowed KSE. The borrower will return the KSE on the next context switch where teh owner wants it back. This removes a lot of possible race conditions and deadlocks. It is consceivable that the borrower should inherit the priority of the owner too. that's another discussion and would be simple to do. Also, as part of this, the "preallocatd spare thread" is attached to the thread doing a syscall rather than the KSE. This removes the need to lock the scheduler when we want to access it, as it's now "at hand". DDB now shows a lot mor info for threaded proceses though it may need some optimisation to squeeze it all back into 80 chars again. (possible JKH project) Upcalls are now "bound" threads, but "KSE Lending" now means that other completing syscalls can be completed using that KSE before the upcall finally makes it back to the UTS. (getting threads OUT OF THE KERNEL is one of the highest priorities in the KSE system.) The upcall when it happens will present all the completed syscalls to the KSE for selection. Revision Changes Path 1.34 +8 -3 src/sys/ddb/db_ps.c 1.235 +22 -1 src/sys/i386/i386/trap.c 1.193 +7 -3 src/sys/i386/i386/vm_machdep.c 1.212 +0 -4 src/sys/kern/init_main.c 1.33 +6 -8 src/sys/kern/kern_condvar.c 1.182 +11 -4 src/sys/kern/kern_exit.c 1.169 +0 -2 src/sys/kern/kern_fork.c 1.161 +14 -19 src/sys/kern/kern_proc.c 1.42 +130 -105 src/sys/kern/kern_switch.c 1.202 +11 -21 src/sys/kern/kern_synch.c 1.39 +264 -169 src/sys/kern/kern_thread.c 1.267 +3 -1 src/sys/sys/proc.h To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message