From owner-freebsd-alpha Tue Sep 12 16:23:12 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 D0BF637B423 for ; Tue, 12 Sep 2000 16:23:10 -0700 (PDT) Received: (from jhb@localhost) by pike.osd.bsdi.com (8.9.3/8.9.3) id QAA12225; Tue, 12 Sep 2000 16:23:03 -0700 (PDT) (envelope-from jhb) From: John Baldwin Message-Id: <200009122323.QAA12225@pike.osd.bsdi.com> Subject: Re: cvs commit: src/sys/alpha/alpha trap.c In-Reply-To: from Doug Rabson at "Sep 12, 2000 11:58:12 pm" To: Doug Rabson Date: Tue, 12 Sep 2000 16:23:03 -0700 (PDT) Cc: alpha@FreeBSD.org X-Mailer: ELM [version 2.4ME+ PL68 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Doug Rabson wrote: > On Tue, 12 Sep 2000, Doug Rabson wrote: > > > dfr 2000/09/12 15:47:10 PDT > > > > Modified files: > > sys/alpha/alpha trap.c > > Log: > > Merge changes from the i386 port to allow userret() to be called both > > with and without holding the Giant mutex. > > With this change, my UP test box boots and appears happy. We will see if > it manages to complete its 'make world'. Can you turn on the Giant enter and exit's in interrupt() now? In my test code I can now see recursion happening ok, but the sched_lock recursion is doing some funny things. After my fix to swtch.s, recursion for sched_lock is being saved across cpu_switch properly, but our mutex code seems to be goofing up on mtx_enter still: 138 0:034559493 cpu0 machine/mutex.h.510 REL sched lock [0xfffffc00006662d0] at ../../kern/kern_synch.c:813 r=0 137 0:034508805 cpu0 machine/mutex.h.471 GOT sched lock [0xfffffc00006662d0] at ../../kern/kern_synch.c:785 r=0 136 0:032610555 cpu0 machine/mutex.h.471 GOT Giant [0xfffffc00006664a0] at ../../kern/kern_synch.c:958 r=0 135 0:032560177 cpu0 machine/mutex.h.510 REL Giant [0xfffffc00006664a0] at ../../alpha/alpha/interrupt.c:123 r=0 134 0:032509499 cpu0 machine/mutex.h.471 GOT Giant [0xfffffc00006664a0] at ../../alpha/alpha/interrupt.c:121 r=0 133 0:032504810 cpu0 ../../alpha/alpha/interrupt.c.115 clock interrupt 132 0:032450423 cpu0 machine/mutex.h.510 REL sched lock [0xfffffc00006662d0] at ../../kern/kern_synch.c:956 r=1 At event 132, we release a lock with a recursion count of 1, so we set the recursion depth to 0, and clear the MTX_RECURSED flag, but we still own the lock. However, when we knab the sched_lock again at 137, we don't recurse properly, and it isn't marked as recursed. Thus, when we try to do the last mtx_exit() (in await() in this case) we don't own the mutex. :( However, in other places we are recursing on it ok: 118 0:031513861 cpu0 machine/mutex.h.471 GOT sched lock [0xfffffc00006662d0] at ../../kern/kern_synch.c:898 r=1 117 0:031431686 cpu0 ../../kern/kern_synch.c.897 mi_switch: old proc 0xfffffe0009530720 (pid 16, intr6: isa), schedlock 0xfffffe 116 0:031423046 cpu0 ../../alpha/alpha/interrupt.c.581 ithd_loop pid 16: done 115 0:031374550 cpu0 machine/mutex.h.471 GOT sched lock [0xfffffc00006662d0] at ../../alpha/alpha/interrupt.c:577 r=0 > -- > Doug Rabson Mail: dfr@nlsystems.com > Nonlinear Systems Ltd. Phone: +44 20 8348 3944 -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.cslab.vt.edu/~jobaldwi/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