Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Oct 2004 16:05:49 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 63477 for review
Message-ID:  <200410211605.i9LG5n1t049426@repoman.freebsd.org>

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

Change 63477 by jhb@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);
 }



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