PERFORCE change 115004 for review
John Baldwin
jhb at FreeBSD.org
Sun Feb 25 01:36:37 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=115004
Change 115004 by jhb at jhb_zion on 2007/02/25 01:36:24
Drop the idlespin hack for now.
Affected files ...
.. //depot/projects/smpng/sys/kern/kern_mutex.c#139 edit
Differences ...
==== //depot/projects/smpng/sys/kern/kern_mutex.c#139 (text+ko) ====
@@ -410,14 +410,11 @@
int line)
{
struct thread *td;
- int contested = 0, i = 0, idlespin = 0;
+ int contested = 0, i = 0;
if (LOCK_LOG_TEST(&m->mtx_object, opts))
CTR1(KTR_LOCK, "_mtx_lock_spin: %p spinning", m);
- /* It's ok for the idle loop to spin forever on sched_lock. */
- if (m == &sched_lock && curthread == PCPU_GET(idlethread))
- idlespin = 1;
while (!_obtain_lock(m, tid)) {
lock_profile_obtain_lock_failed(&m->mtx_object, &contested);
@@ -428,8 +425,7 @@
cpu_spinwait();
continue;
}
- if (i < 60000000 || kdb_active || panicstr != NULL ||
- idlespin)
+ if (i < 60000000 || kdb_active || panicstr != NULL)
DELAY(1);
else {
td = mtx_owner(m);
More information about the p4-projects
mailing list