From owner-cvs-all Mon Jan 15 13:36:23 2001 Delivered-To: cvs-all@freebsd.org Received: from meow.osd.bsdi.com (meow.osd.bsdi.com [204.216.28.88]) by hub.freebsd.org (Postfix) with ESMTP id 636BA37B6A5; Mon, 15 Jan 2001 13:35:43 -0800 (PST) Received: from laptop.baldwin.cx (john@jhb-laptop.osd.bsdi.com [204.216.28.241]) by meow.osd.bsdi.com (8.11.1/8.9.3) with ESMTP id f0FLX1193634; Mon, 15 Jan 2001 13:33:01 -0800 (PST) (envelope-from jhb@FreeBSD.org) 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: <200101152123.WAA70376@freebsd.dk> Date: Mon, 15 Jan 2001 13:34:34 -0800 (PST) From: John Baldwin To: Soren Schmidt Subject: Re: cvs commit: src/sys/dev/ata ata-all.c Cc: sos@FreeBSD.org, cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 15-Jan-01 Soren Schmidt wrote: > It seems John Baldwin wrote: >> >> Erm, all of this should be running under Giant, so you shouldn't be >> >> contending >> >> on this. You should probably protect this with a mutex that locks the >> >> softc >> >> rather than using atomic operations, btw. >> > >> > If thats correct the change should have no effect right ? >> >> No. Giant is handled very specially. We release it before mi_switch() in >> all >> cases except for blocking on a mutex. The order that phk mentioned in his >> e-mail would result in the variable getting stomped. In that case though, I >> think it would get stomped without SMPng as well. > > Hmm, I dont see me changing the cmp and set from multi instructions > into an atomic one can change anything when its still under giant. When we switch to the ithread, we release Giant. However, the interrupt thread should be delayed until later when you do a tsleep() since our kernel isn't preemptive just yet. Let me go look at the code again. -- 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 cvs-all" in the body of the message