From owner-freebsd-alpha Sun Sep 24 17: 8:51 2000 Delivered-To: freebsd-alpha@freebsd.org Received: from pike.osd.bsdi.com (pike.osd.bsdi.com [204.216.28.222]) by hub.freebsd.org (Postfix) with ESMTP id 3A98F37B424 for ; Sun, 24 Sep 2000 17:08:49 -0700 (PDT) Received: from foo.osd.bsdi.com (root@foo.osd.bsdi.com [204.216.28.137]) by pike.osd.bsdi.com (8.11.0/8.9.3) with ESMTP id e8P08Pi17924; Sun, 24 Sep 2000 17:08:25 -0700 (PDT) (envelope-from jhb@foo.osd.bsdi.com) Received: (from jhb@localhost) by foo.osd.bsdi.com (8.11.0/8.11.0) id e8P06sj29257; Sun, 24 Sep 2000 17:06:54 -0700 (PDT) (envelope-from jhb) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200009242106.OAA53607@john.baldwin.cx> Date: Sun, 24 Sep 2000 17:06:54 -0700 (PDT) Organization: BSD, Inc. From: John Baldwin To: alpha@FreeBSD.ORG Subject: RE: Ithreads kernel weirdness Cc: Doug Rabson Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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 -- 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