From owner-p4-projects@FreeBSD.ORG Fri Sep 3 00:08:23 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DD97816A4D0; Fri, 3 Sep 2004 00:08:22 +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 8399C16A4CE for ; Fri, 3 Sep 2004 00:08:22 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6687B43D5E for ; Fri, 3 Sep 2004 00:08:22 +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 i8308Mmo007507 for ; Fri, 3 Sep 2004 00:08:22 GMT (envelope-from julian@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i8308MxG007504 for perforce@freebsd.org; Fri, 3 Sep 2004 00:08:22 GMT (envelope-from julian@freebsd.org) Date: Fri, 3 Sep 2004 00:08:22 GMT Message-Id: <200409030008.i8308MxG007504@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 60903 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: Fri, 03 Sep 2004 00:08:23 -0000 http://perforce.freebsd.org/chv.cgi?CH=60903 Change 60903 by julian@julian_ref on 2004/09/03 00:07:42 loop back stuff Affected files ... .. //depot/projects/nsched/sys/conf/NOTES#16 integrate .. //depot/projects/nsched/sys/kern/kern_switch.c#9 integrate Differences ... ==== //depot/projects/nsched/sys/conf/NOTES#16 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1273 2004/09/02 20:44:56 alfred Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1274 2004/09/02 22:21:51 scottl Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -217,7 +217,7 @@ # a lock hierarchy violation occurs or if locks are held when going to # sleep. # WITNESS_SKIPSPIN disables the witness checks on spin mutexes. -options PREEMPTION +options PREEMPTION options FULL_PREEMPTION options MUTEX_DEBUG options WITNESS ==== //depot/projects/nsched/sys/kern/kern_switch.c#9 (text+ko) ==== @@ -86,7 +86,7 @@ ***/ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_switch.c,v 1.84 2004/09/02 18:59:15 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_switch.c,v 1.85 2004/09/02 23:37:41 julian Exp $"); #include "opt_sched.h" @@ -118,11 +118,6 @@ CTASSERT((RQB_BPW * RQB_LEN) == RQ_NQS); -void panc(char *string1, char *string2); - -#if 0 -static void runq_readjust(struct runq *rq, struct kse *ke); -#endif /************************************************************************ * Functions that manipulate runnability from a thread perspective. * ************************************************************************/ @@ -774,110 +769,6 @@ } } -#if 0 -void -panc(char *string1, char *string2) -{ - printf("%s", string1); - kdb_enter(string2); -} - -void -thread_sanity_check(struct thread *td, char *string) -{ - struct proc *p; - struct ksegrp *kg; - struct kse *ke; - struct thread *td2 = NULL; - unsigned int prevpri; - int saw_lastassigned = 0; - int unassigned = 0; - int assigned = 0; - - p = td->td_proc; - kg = td->td_ksegrp; - ke = td->td_kse; - - - if (ke) { - if (p != ke->ke_proc) { - panc(string, "wrong proc"); - } - if (ke->ke_thread != td) { - panc(string, "wrong thread"); - } - } - - if ((p->p_flag & P_SA) == 0) { - if (ke == NULL) { - panc(string, "non KSE thread lost kse"); - } - } else { - prevpri = 0; - saw_lastassigned = 0; - unassigned = 0; - assigned = 0; - TAILQ_FOREACH(td2, &kg->kg_runq, td_runq) { - if (td2->td_priority < prevpri) { - panc(string, "thread runqueue unosorted"); - } - if ((td2->td_state == TDS_RUNQ) && - td2->td_kse && - (td2->td_kse->ke_state != KES_ONRUNQ)) { - panc(string, "KSE wrong state"); - } - prevpri = td2->td_priority; - if (td2->td_kse) { - assigned++; - if (unassigned) { - panc(string, "unassigned before assigned"); - } - if (kg->kg_last_assigned == NULL) { - panc(string, "lastassigned corrupt"); - } - if (saw_lastassigned) { - panc(string, "last assigned not last"); - } - if (td2->td_kse->ke_thread != td2) { - panc(string, "mismatched kse/thread"); - } - } else { - unassigned++; - } - if (td2 == kg->kg_last_assigned) { - saw_lastassigned = 1; - if (td2->td_kse == NULL) { - panc(string, "last assigned not assigned"); - } - } - } - if (kg->kg_last_assigned && (saw_lastassigned == 0)) { - panc(string, "where on earth does lastassigned point?"); - } -#if 0 - FOREACH_THREAD_IN_GROUP(kg, td2) { - if (((td2->td_flags & TDF_UNBOUND) == 0) && - (TD_ON_RUNQ(td2))) { - assigned++; - if (td2->td_kse == NULL) { - panc(string, "BOUND thread with no KSE"); - } - } - } -#endif -#if 0 - if ((unassigned + assigned) != kg->kg_runnable) { - panc(string, "wrong number in runnable"); - } -#endif - } - if (assigned == 12345) { - printf("%p %p %p %p %p %d, %d", - td, td2, ke, kg, p, assigned, saw_lastassigned); - } -} -#endif - /****** functions that are temporarily here ***********/ #include #define RANGEOF(type, start, end) (offsetof(type, end) - offsetof(type, start))