svn commit: r202809 - head/sys/mips/rmi
Randall Stewart
rrs at FreeBSD.org
Fri Jan 22 14:25:18 UTC 2010
Author: rrs
Date: Fri Jan 22 14:25:17 2010
New Revision: 202809
URL: http://svn.freebsd.org/changeset/base/202809
Log:
This hopefully will fix the network problem I was seeing.
Basically the msg ring interrupt was being re-enabled
inside a spinlock as the thread set it self up for rescheduling.
This won't work since inside the re-enable is another
spin lock.. which means on return from the reenable
the interrupts have been reenabled. Thus you would
get a clock int and end up panicing holding a spin
lock to long :-o
Modified:
head/sys/mips/rmi/xlr_machdep.c
Modified: head/sys/mips/rmi/xlr_machdep.c
==============================================================================
--- head/sys/mips/rmi/xlr_machdep.c Fri Jan 22 14:09:15 2010 (r202808)
+++ head/sys/mips/rmi/xlr_machdep.c Fri Jan 22 14:25:17 2010 (r202809)
@@ -618,18 +618,14 @@ msgring_process_fast_intr(void *arg)
*/
disable_msgring_int(NULL);
it->i_pending = 1;
+ thread_lock(td);
if (TD_AWAITING_INTR(td)) {
- thread_lock(td);
CTR3(KTR_INTR, "%s: schedule pid %d (%s)", __func__, p->p_pid,
p->p_comm);
TD_CLR_IWAIT(td);
sched_add(td, SRQ_INTR);
- thread_unlock(td);
- } else {
- CTR4(KTR_INTR, "%s: pid %d (%s): state %d",
- __func__, p->p_pid, p->p_comm, td->td_state);
}
-
+ thread_unlock(td);
}
#define MIT_DEAD 4
@@ -668,13 +664,17 @@ msgring_process(void *arg)
atomic_store_rel_int(&ithd->i_pending, 0);
xlr_msgring_handler(NULL);
}
+ enable_msgring_int(NULL);
if (!ithd->i_pending && !(ithd->i_flags & MIT_DEAD)) {
thread_lock(td);
+ if (ithd->i_pending) {
+ thread_unlock(td);
+ continue;
+ }
sched_class(td, PRI_ITHD);
TD_SET_IWAIT(td);
- thread_unlock(td);
- enable_msgring_int(NULL);
mi_switch(SW_VOL, NULL);
+ thread_unlock(td);
}
}
More information about the svn-src-all
mailing list