PERFORCE change 60903 for review

Julian Elischer julian at FreeBSD.org
Thu Sep 2 17:08:23 PDT 2004


http://perforce.freebsd.org/chv.cgi?CH=60903

Change 60903 by julian at 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 <sys/cdefs.h>
-__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 <vm/uma.h>
 #define RANGEOF(type, start, end) (offsetof(type, end) - offsetof(type, start))


More information about the p4-projects mailing list