Date: Tue, 12 Oct 2004 15:56:51 -0400 From: John Baldwin <jhb@FreeBSD.org> To: current@FreeBSD.org Subject: Possible fix for KSE threads that never wake up Message-ID: <200410121556.51976.jhb@FreeBSD.org>
next in thread | raw e-mail | index | archive | help
Currently the KSE code arbitrarily sets the SLEEPING inhibitor on any thread it suspends that is on the sleep queue. Threads that are on the sleep queue however are not always asleep and it adds needless complication and opportunity for bugs (if the inhibitor is not otherwise cleared the thread may never get to run again). Since the suspension code uses its own inhibitor the hack isn't even needed. This patch just turns it off. Let me know if this fixes any problems people are seeing: --- //depot/projects/smpng/sys/kern/kern_thread.c 2004/10/12 19:09:56 +++ //depot/user/jhb/preemption/kern/kern_thread.c 2004/10/12 19:26:23 @@ -999,6 +999,7 @@ p->p_suspcount++; TD_SET_SUSPENDED(td); TAILQ_INSERT_TAIL(&p->p_suspended, td, td_runq); +#if 0 /* * Hack: If we are suspending but are on the sleep queue * then we are in msleep or the cv equivalent. We @@ -1007,6 +1008,7 @@ */ if (TD_ON_SLEEPQ(td)) TD_SET_SLEEPING(td); +#endif } void -- John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200410121556.51976.jhb>