RFR: 8187227: __m68k_cmpxchg() is not being used correctly
David Holmes
david.holmes at oracle.com
Sun Nov 19 12:25:02 UTC 2017
On 18/11/2017 10:15 PM, John Paul Adrian Glaubitz wrote:
> On 11/18/2017 12:46 PM, Andrew Haley wrote:
>>> Without seeing how that wrapper actually works, it is hard to know
>>> whether what you are saying and your fix is correct. The description of
>>> the CAS at [1] doesn't help without knowing how it actually gets used.
>>
>> I can't see the point of the loops.
>
> The loops are necessary because it's not guaranteed that the CAS instruction
> will succeed at first attempt. You basically have to keep trying until it
> succeeds. At least to my current knowledge.
But a CAS can fail. Only if it can fail spuriously (ie for a reason
other than *dest!=expected) should a loop be needed.
> The loops are already in the code, FWIW. I am just modifying the code because
> the current code makes incorrect assumptions on how __m68k_cmpxchg() actually
> works.
True the loops do exist. But I for one can't make much sense out this
code at present, so impossible to validate your changes. If the code is
as broken as you suggest why don't you see massive failures during testing?
David
> Adrian
>
More information about the hotspot-dev
mailing list