PERFORCE change 61079 for review

Julian Elischer julian at FreeBSD.org
Sun Sep 5 23:14:11 PDT 2004


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

Change 61079 by julian at julian_ref on 2004/09/06 06:13:38

	keep stats on followons

Affected files ...

.. //depot/projects/nsched/sys/kern/sched_4bsd.c#40 edit

Differences ...

==== //depot/projects/nsched/sys/kern/sched_4bsd.c#40 (text+ko) ====

@@ -254,6 +254,16 @@
 	   &sched_followon, 0,
 	   "allow threads to share a quantum");
 
+static int sched_pfollowons = 0;
+SYSCTL_INT(_kern_sched, OID_AUTO, pfollowons, CTLFLAG_RD,
+	   &sched_pfollowons, 0,
+	   "number of followons done to a different ksegrp");
+
+static int sched_kgfollowons = 0;
+SYSCTL_INT(_kern_sched, OID_AUTO, kgfollowons, CTLFLAG_RD,
+	   &sched_kgfollowons, 0,
+	   "number of followons done in a ksegrp");
+
 /*
  * Arrange to reschedule if necessary, taking the priorities and
  * schedulers into account.
@@ -769,9 +779,11 @@
 		 kg = td->td_ksegrp;
 		 if ((newtd = TAILQ_FIRST(&kg->kg_runq))) {
 			remrunqueue(newtd);
+			sched_kgfollowons++;
 		 } else {
 			FOREACH_KSEGRP_IN_PROC(p, kg) {
 				if ((newtd = TAILQ_FIRST(&kg->kg_runq))) {
+					sched_pfollowons++;
 					remrunqueue(newtd);
 					break;
 				}


More information about the p4-projects mailing list