Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Aug 2006 09:47:18 GMT
From:      John Birrell <jb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 103374 for review
Message-ID:  <200608070947.k779lIdW039710@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=103374

Change 103374 by jb@jb_freebsd2 on 2006/08/07 09:47:13

	Fix a merge problem with the NOKSE (aka bike_sched) case.

Affected files ...

.. //depot/projects/dtrace/src/sys/kern/sched_4bsd.c#12 edit

Differences ...

==== //depot/projects/dtrace/src/sys/kern/sched_4bsd.c#12 (text+ko) ====

@@ -913,8 +913,19 @@
 void
 sched_exit(struct proc *p, struct thread *td)
 {
+#ifdef KSE
 	sched_exit_ksegrp(FIRST_KSEGRP_IN_PROC(p), td);
 	sched_exit_thread(FIRST_THREAD_IN_PROC(p), td);
+#else
+	struct thread *parent = FIRST_THREAD_IN_PROC(p);
+
+	CTR3(KTR_SCHED, "sched_exit: %p(%s) prio %d",
+	    td, td->td_proc->p_comm, td->td_priority);
+
+	parent->td_estcpu = ESTCPULIM(parent->td_estcpu + td->td_estcpu);
+	if ((td->td_proc->p_flag & P_NOLOAD) == 0)
+		sched_load_rem();
+#endif
 }
 
 #ifdef KSE
@@ -939,10 +950,16 @@
 void
 sched_fork(struct thread *td, struct thread *childtd)
 {
+#ifdef KSE
 	sched_fork_ksegrp(td, childtd->td_ksegrp);
 	sched_fork_thread(td, childtd);
+#else
+	childtd->td_estcpu = td->td_estcpu;
+	sched_newthread(childtd);
+#endif
 }
 
+#ifdef KSE
 void
 sched_fork_ksegrp(struct thread *td, struct ksegrp *child)
 {
@@ -955,6 +972,7 @@
 {
 	sched_newthread(childtd);
 }
+#endif
 
 void
 sched_nice(struct proc *p, int nice)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608070947.k779lIdW039710>