From owner-p4-projects@FreeBSD.ORG Tue Oct 5 21:40:15 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 71E0716A4D0; Tue, 5 Oct 2004 21:40:15 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4E08016A4CE for ; Tue, 5 Oct 2004 21:40:15 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 287A443D4C for ; Tue, 5 Oct 2004 21:40:15 +0000 (GMT) (envelope-from julian@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i95LeFDQ080912 for ; Tue, 5 Oct 2004 21:40:15 GMT (envelope-from julian@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i95LeEJ2080909 for perforce@freebsd.org; Tue, 5 Oct 2004 21:40:14 GMT (envelope-from julian@freebsd.org) Date: Tue, 5 Oct 2004 21:40:14 GMT Message-Id: <200410052140.i95LeEJ2080909@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to julian@freebsd.org using -f From: Julian Elischer To: Perforce Change Reviews Subject: PERFORCE change 62704 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Oct 2004 21:40:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=62704 Change 62704 by julian@julian_ref on 2004/10/05 21:39:28 IFC@62701 Loop back changes Affected files ... .. //depot/projects/nsched/sys/kern/kern_switch.c#38 integrate .. //depot/projects/nsched/sys/kern/sched_4bsd.c#60 integrate .. //depot/projects/nsched/sys/kern/sched_ule.c#38 integrate Differences ... ==== //depot/projects/nsched/sys/kern/kern_switch.c#38 (text+ko) ==== @@ -86,7 +86,7 @@ ***/ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_switch.c,v 1.95 2004/09/19 18:34:17 das Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_switch.c,v 1.96 2004/10/05 21:10:43 julian Exp $"); #include "opt_sched.h" ==== //depot/projects/nsched/sys/kern/sched_4bsd.c#60 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/sched_4bsd.c,v 1.65 2004/09/16 07:12:59 julian Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/sched_4bsd.c,v 1.66 2004/10/05 21:10:44 julian Exp $"); #define kse td_sched ==== //depot/projects/nsched/sys/kern/sched_ule.c#38 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/sched_ule.c,v 1.130 2004/09/16 07:12:59 julian Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/sched_ule.c,v 1.132 2004/10/05 21:26:27 julian Exp $"); #include @@ -186,6 +186,17 @@ ("slots out of whack"));*/ \ } while (0) +#define SLOT_USE(kg) \ +do { \ + kg->kg_avail_opennings--; \ + CTR3(KTR_RUNQ, "kg %p(%d) Slot used (->%d)", \ + kg, \ + kg->kg_concurrency, \ + kg->kg_avail_opennings); \ + /*KASSERT((kg->kg_avail_opennings >= 0), \ + ("slots out of whack"));*/ \ +} while (0) + static struct kse kse0; static struct kg_sched kg_sched0; @@ -1301,8 +1312,8 @@ * then account for it as if it had been added to the * run queue and then chosen. */ + newtd->td_kse->ke_flags |= KEF_DIDRUN; SLOT_USE(newtd->td_ksegrp); - newtd->td_kse->ke_flags |= KEF_DIDRUN; TD_SET_RUNNING(newtd); kseq_load_add(KSEQ_SELF(), newtd->td_kse); } else { @@ -1827,7 +1838,7 @@ ("sched_rem: KSE not on run queue")); ke->ke_state = KES_THREAD; - td->td_ksegrp->kg_avail_opennings++; + SLOT_RELEASE(td->td_ksegrp); ke->ke_ksegrp->kg_runq_threads--; kseq = KSEQ_CPU(ke->ke_cpu); kseq_runq_rem(kseq, ke);