PERFORCE change 146136 for review

John Baldwin jhb at FreeBSD.org
Mon Jul 28 17:54:28 UTC 2008


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

Change 146136 by jhb at jhb_mutex on 2008/07/28 17:53:48

	Prefer the last CPU we ran on if all else is equal.

Affected files ...

.. //depot/projects/smpng/sys/kern/sched_4bsd.c#86 edit

Differences ...

==== //depot/projects/smpng/sys/kern/sched_4bsd.c#86 (text+ko) ====

@@ -1167,7 +1167,10 @@
 
 	mtx_assert(&sched_lock, MA_OWNED);
 
-	best = NOCPU;
+	if (THREAD_CAN_SCHED(td, td->td_lastcpu))
+		best = td->td_lastcpu;
+	else
+		best = NOCPU;
 	for (cpu = 0; cpu <= mp_maxid; cpu++) {
 		if (CPU_ABSENT(cpu))
 			continue;


More information about the p4-projects mailing list