PERFORCE change 61078 for review

Julian Elischer julian at FreeBSD.org
Sun Sep 5 22:58:52 PDT 2004


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

Change 61078 by julian at julian_ref on 2004/09/06 05:58:39

	make the followon cod econtrollable by a sysctl

Affected files ...

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

Differences ...

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

@@ -247,7 +247,12 @@
 SYSCTL_INT(_kern_sched_ipiwakeup, OID_AUTO, htt2, CTLFLAG_RW,
 	   &forward_wakeup_use_htt, 0,
 	   "account for htt");
+
 #endif
+static int sched_followon = 0;
+SYSCTL_INT(_kern_sched, OID_AUTO, followon, CTLFLAG_RW,
+	   &sched_followon, 0,
+	   "allow threads to share a quantum");
 
 /*
  * Arrange to reschedule if necessary, taking the priorities and
@@ -756,7 +761,10 @@
 	 * First try another thread in our ksegrp, and then look for 
 	 * other ksegrps in our process.
 	 */
-	if ((p->p_flag & P_HADTHREADS) && (flags & SW_VOL) && newtd == NULL) {
+	if (sched_followon &&
+	    (p->p_flag & P_HADTHREADS) &&
+	    (flags & SW_VOL) &&
+	    newtd == NULL) {
 		/* lets schedule another thread from this process */
 		 kg = td->td_ksegrp;
 		 if ((newtd = TAILQ_FIRST(&kg->kg_runq))) {


More information about the p4-projects mailing list