From owner-cvs-all Mon Jan 15 13:24:16 2001 Delivered-To: cvs-all@freebsd.org Received: from freebsd.dk (freebsd.dk [212.242.42.178]) by hub.freebsd.org (Postfix) with ESMTP id 10C2237B402; Mon, 15 Jan 2001 13:23:51 -0800 (PST) Received: (from sos@localhost) by freebsd.dk (8.9.3/8.9.1) id WAA70376; Mon, 15 Jan 2001 22:23:47 +0100 (CET) (envelope-from sos) From: Soren Schmidt Message-Id: <200101152123.WAA70376@freebsd.dk> Subject: Re: cvs commit: src/sys/dev/ata ata-all.c In-Reply-To: from John Baldwin at "Jan 15, 2001 01:17:22 pm" To: jhb@FreeBSD.org (John Baldwin) Date: Mon, 15 Jan 2001 22:23:47 +0100 (CET) Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, sos@FreeBSD.org X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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. The case phk descripes is valid, and I can surefire hang a SMP system if I use any SW RAID code. Just as a datapoint for you, I have never ever seen it fail under PRE_SMPNG or -stable... -Søren To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message