Date: Mon, 25 Sep 2000 09:55:56 +0100 (BST) From: Doug Rabson <dfr@nlsystems.com> To: John Baldwin <jhb@FreeBSD.ORG> Cc: alpha@FreeBSD.ORG Subject: RE: Ithreads kernel weirdness Message-ID: <Pine.BSF.4.21.0009250953360.35016-100000@salmon.nlsystems.com> In-Reply-To: <XFMail.000924170654.jhb@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 24 Sep 2000, John Baldwin wrote: > > On 24-Sep-00 John Baldwin wrote: > >> Does this fix the hang you were seeing before? I'm hoping its the same > >> problem which was hanging the the rawhide when I was trying to get the > >> ithreads changes to dxlpx to work. > > > > Yes. Actually, it looks like the kproc's (syncer, for example) are > > starting off with a saved PSR that has an IPL != 0 in them. I'm going > > to be looking at this some more today. > > Ok, the problem was that when a new process started, it called > exception_restart() with a recursed sched_lock. The MTX_EXIT() > macro assumed that the sched_lock it was getting was not recursed > (which it didnt need to be for the return path that a new process > uses), however, it didn't update the mtx_recurse counter. Thus, > the next time the sched_lock was obtained and released, the release > thought it was unrecursing, and didn't fully release the sched_lock, > thus leaving interrupts disabled still. The "fix" is to have the > MTX_EXIT() macro explicitly set the recursion count to 0 when it > releases the mutex. An updated patch should be up at > http://www.FreeBSD.org/~jhb/patches/alpha.ithreads.patch in a few > minutes. It has lots of debugging printf()'s after spl0's to > make sure that interrupts are actually enabled after spl0's (as > they always were back when spl's did something). You shouldn't > see any of these kernel printf's referencing spl0. If you do, it's > a bug. :P Woo. Good sleuthing. I'll have to update my IA64 version of MTX_EXIT to do the right thing :-). Alternatively, cpu_fork should clear pcb_schednest. -- Doug Rabson Mail: dfr@nlsystems.com Phone: +44 20 8348 6160 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0009250953360.35016-100000>