Message from discussion lwarx/stwcx on PowerPC 970
NNTP-Posting-Date: Mon, 11 Apr 2005 11:28:03 -0500
Subject: Re: lwarx/stwcx on PowerPC 970
References: <4257CC7A.252E5B2@web.de> <opsoyu88daqm36vk@grunion> <firstname.lastname@example.org> <opso0ithrpqm36vk@grunion> <email@example.com> <firstname.lastname@example.org>
Date: Mon, 11 Apr 2005 12:27:43 -0400
From: "Joe Seigh" <jseigh...@xemaps.com>
Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-15
User-Agent: Opera M2/7.54 (Win32, build 3865)
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
On Mon, 11 Apr 2005 09:57:40 -0500, Naresh Nayar <na...@us.ibm.com> top
posted (but I fixed it):
> "Dan Koren" <danko...@yahoo.com> wrote in message
>> "Joe Seigh" <jseigh...@xemaps.com> wrote in message
>> > On Sun, 10 Apr 2005 04:55:33 -0400, Dan Koren <danko...@yahoo.com>
>> >> "Joe Seigh" <jseigh...@xemaps.com> wrote in message
>> >> news:opsoyu88daqm36vk@grunion...
>> >>> Just "strongly recommended", not required. The reservations obviously
>> >>> aren't recursively counted since the OS has no way of knowing the
>> >>> in order to "clear" the reservations. Unless there's some performance
>> >>> hit for maintaining the reservation, I can't see any reason to worry
>> >>> about it.
>> >> a) this is not an OS issue -- the lwarx/stwcx instructions
>> >> are executed directly by hardware without os involvement ;-)
>> >> b) the programming note is incorrect, the reservation is
>> >> cleared by any store following the lwarx -- otherwise
>> >> the lwarx/stwcx primitives would not work ;-)
>> > Any store?
>> Any store intructions, it does not have to be another stwcx.
> The processor holding the reservation can execute a store type of
> instruction without losing the reservation.
"can" meaning it's possible but not guaranteed. As a practical matter,
not knowing the reservation granule size, a thread doing a reserve would
have to assume any store *could* clear the reservation and program as if
it always did.
But at least you didn't say "the reservation is cleared by any store
following the lwarx". That is clearly incorrect. :)