diff options
author | jhb <jhb@FreeBSD.org> | 2004-08-04 20:24:40 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2004-08-04 20:24:40 +0000 |
commit | f513ad537cff0033d6eb269c47350258e757e1ba (patch) | |
tree | c372b68751f9d371c422c2deea443e456a761704 /sys/kern/kern_synch.c | |
parent | c75eeac1dfdfc56d2aadab24b5ff9a35f2c42d46 (diff) | |
download | FreeBSD-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.c | 6 |
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); |