From owner-freebsd-alpha Tue Sep 12 15:12:13 2000 Delivered-To: freebsd-alpha@freebsd.org Received: from anchor-post-32.mail.demon.net (anchor-post-32.mail.demon.net [194.217.242.90]) by hub.freebsd.org (Postfix) with ESMTP id 418E637B422 for ; Tue, 12 Sep 2000 15:12:11 -0700 (PDT) Received: from nlsys.demon.co.uk ([158.152.125.33] helo=herring.nlsystems.com) by anchor-post-32.mail.demon.net with esmtp (Exim 2.12 #1) id 13YyHh-000JVV-0W; Tue, 12 Sep 2000 23:12:09 +0100 Received: from salmon.nlsystems.com (salmon.nlsystems.com [10.0.0.3]) by herring.nlsystems.com (8.9.3/8.8.8) with ESMTP id XAA10106; Tue, 12 Sep 2000 23:13:16 +0100 (BST) (envelope-from dfr@nlsystems.com) Date: Tue, 12 Sep 2000 23:12:26 +0100 (BST) From: Doug Rabson To: John Baldwin Cc: alpha@freebsd.org Subject: Re: Mutex's aren't recursing In-Reply-To: <200009122143.OAA08606@pike.osd.bsdi.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Tue, 12 Sep 2000, John Baldwin wrote: > Doug Rabson wrote: > > I sent you some mail yesterday about this. I got the constraints wrong for > > the inline assembler in atomic_cmpset. I disassembled some of the code in > > interrupt.c which is trying to enter the mutex. You can clearly see that > > it is misusing t1 as both an input and output to the inline. > > Thanks! I'll try this out. Also, I just discovered that swtch.s didn't import > sched_lock, so cpu_switch was modifying a private copy of sched_lock instead > of the global variable (I think). I'll have some feedback on this in just a > sec. It doesn't work - I'm still working on it. I have a new version of cmpset which does appear to work for recursion but oddly makes the kernel panic almost instantly we try to get into single user mode. I think its probably right after a context switch since I can see mi_switch() releasing Giant a few times but not regaining it in the new process. I'm in the middle of building a new kernel with more KTRs enabled. -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 20 8348 3944 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message