Date: Tue, 12 Sep 2000 23:39:51 +0200 From: Bernd Walter <ticso@cicely5.cicely.de> To: Doug Rabson <dfr@nlsystems.com> Cc: John Baldwin <jhb@pike.osd.bsdi.com>, alpha@FreeBSD.ORG Subject: Re: Mutex's aren't recursing Message-ID: <20000912233951.A56554@cicely5.cicely.de> In-Reply-To: <Pine.BSF.4.21.0009122128540.86297-100000@salmon.nlsystems.com>; from dfr@nlsystems.com on Tue, Sep 12, 2000 at 09:32:23PM %2B0100 References: <200009120028.RAA71076@pike.osd.bsdi.com> <Pine.BSF.4.21.0009122128540.86297-100000@salmon.nlsystems.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Sep 12, 2000 at 09:32:23PM +0100, 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. > > 0xfffffc00005542c4 <interrupt+900>: lda t1,8(zero) > 0xfffffc00005542c8 <interrupt+904>: ldq t0,64(t7) > 0xfffffc00005542cc <interrupt+908>: ldq_l t1,0(s1) > 0xfffffc00005542d0 <interrupt+912>: cmpeq t1,t1,t2 > 0xfffffc00005542d4 <interrupt+916>: beq t2,0xfffffc00005542e4 <interrupt+932> > 0xfffffc00005542d8 <interrupt+920>: mov t0,t1 > 0xfffffc00005542dc <interrupt+924>: stq_c t1,0(s1) > > I'm just about to start testing this patch which should fix the problem > and also provides efficent forms for > atomic_{add,subtract,set,clear}_{32,64}. I also fixed the interrupt > problems with the spin locks (I think). Your patch does the following on a PC164 to me: 1. The mutex change will hang my system every second boot during PCI device printings. 2. Both changes panic the system on boot: [...] da12: <IBM WDS-3200 !J S550> Fixed Direct Access SCSI-2 device da12: 5.000MB/s transfers (5.000MHz, offset 7) da12: 206MB (422912 512 byte sectors: 64H 32S/T 206C) da14 at sym2 bus 0 target 3 lun 0 da14: <CDC 94221-5 5342> Fixed Direct Access SCSI-CCS device da14: 3.300MB/s transfers da14: 170MB (349770 512 byte sectors: 64H 32S/T 170C) Mounting root from ufs:/dev/da0a fatal kernel trap: trap entry = 0x2 (memory management fault) a0 = 0x0 a1 = 0x1 a2 = 0x0 pc = 0xfffffc0000517458 ra = 0xfffffc0000518fbc curproc = 0xfffffe0008e02720 pid = 7, comm = init Stopped at mtx_exit_hard+0x118: ldq t1,0(s1) <0x0> <t1=0x8,s1=0x0> db> trace mtx_exit_hard() at mtx_exit_hard+0x118 child_return() at child_return+0x9c exception_return() at exception_return -- B.Walter COSMO-Project http://www.cosmo-project.de ticso@cicely.de Usergroup info@cosmo-project.de 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?20000912233951.A56554>