PERFORCE change 63477 for review

John Baldwin jhb at FreeBSD.org
Thu Oct 21 09:05:50 PDT 2004


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

Change 63477 by jhb at jhb_slimer on 2004/10/21 16:05:20

	Merge from needresched the change to do the sched_prio() before
	putting the thread on the run queue rather than when it starts
	executing.

Affected files ...

.. //depot/projects/smpng/sys/vm/vm_zeroidle.c#20 integrate

Differences ...

==== //depot/projects/smpng/sys/vm/vm_zeroidle.c#20 (text+ko) ====

@@ -137,14 +137,9 @@
 static void
 vm_pagezero(void __unused *arg)
 {
-	struct proc *p;
 	struct thread *td;
 
 	td = curthread;
-	p = td->td_proc;
-	mtx_lock_spin(&sched_lock);
-	sched_prio(td, PRI_MAX_IDLE);
-	mtx_unlock_spin(&sched_lock);
 	idlezero_enable = idlezero_enable_default;
 
 	for (;;) {
@@ -181,6 +176,7 @@
 	pagezero_proc->p_flag |= P_NOLOAD;
 	PROC_UNLOCK(pagezero_proc);
 	mtx_lock_spin(&sched_lock);
+	sched_prio(FIRST_THREAD_IN_PROC(pagezero_proc), PRI_MAX_IDLE);
 	setrunqueue(FIRST_THREAD_IN_PROC(pagezero_proc), SRQ_BORING);
 	mtx_unlock_spin(&sched_lock);
 }


More information about the p4-projects mailing list