summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_synch.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2004-08-04 20:24:40 +0000
committerjhb <jhb@FreeBSD.org>2004-08-04 20:24:40 +0000
commitf513ad537cff0033d6eb269c47350258e757e1ba (patch)
treec372b68751f9d371c422c2deea443e456a761704 /sys/kern/kern_synch.c
parentc75eeac1dfdfc56d2aadab24b5ff9a35f2c42d46 (diff)
downloadFreeBSD-src-f513ad537cff0033d6eb269c47350258e757e1ba.zip
FreeBSD-src-f513ad537cff0033d6eb269c47350258e757e1ba.tar.gz
Workaround a possible deadlock on SMP due to a spin lock LOR by disabling
the immediate awakening of proc0 (scheduler kproc, controls swapping processes in and out). The scheduler process periodically awakens already, so this will not result in processes not being swapped in, there will just be more latency in between a thread being made runnable and the scheduler waking up to swap the affected process back in.
Diffstat (limited to 'sys/kern/kern_synch.c')
-rw-r--r--sys/kern/kern_synch.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c
index 6b6d829..2e48ef1 100644
--- a/sys/kern/kern_synch.c
+++ b/sys/kern/kern_synch.c
@@ -402,7 +402,13 @@ setrunnable(struct thread *td)
if ((p->p_sflag & PS_INMEM) == 0) {
if ((p->p_sflag & PS_SWAPPINGIN) == 0) {
p->p_sflag |= PS_SWAPINREQ;
+#ifndef SMP
+ /*
+ * XXX: Disabled on SMP due to a LOR between
+ * sched_lock and the sleepqueue chain locks.
+ */
wakeup(&proc0);
+#endif
}
} else
sched_wakeup(td);
OpenPOWER on IntegriCloud