Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Jan 2001 23:01:00 +0100
From:      Poul-Henning Kamp <phk@critter.freebsd.dk>
To:        Soren Schmidt <sos@freebsd.dk>
Cc:        jhb@FreeBSD.org (John Baldwin), cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, sos@FreeBSD.org
Subject:   Re: cvs commit: src/sys/dev/ata ata-all.c 
Message-ID:  <39827.979596060@critter>
In-Reply-To: Your message of "Mon, 15 Jan 2001 22:23:47 %2B0100." <200101152123.WAA70376@freebsd.dk> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <200101152123.WAA70376@freebsd.dk>, Soren Schmidt writes:
>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...

...because the interrupts were masked by splbio() there.

--
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?39827.979596060>