Date: Sun, 24 Sep 2000 17:06:54 -0700 (PDT) From: John Baldwin <jhb@FreeBSD.ORG> To: alpha@FreeBSD.ORG Cc: Doug Rabson <dfr@nlsystems.com> Subject: RE: Ithreads kernel weirdness Message-ID: <XFMail.000924170654.jhb@FreeBSD.org> In-Reply-To: <200009242106.OAA53607@john.baldwin.cx>
next in thread | previous in thread | raw e-mail | index | archive | help
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 -- John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.Baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ 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?XFMail.000924170654.jhb>