vibhu.mohindra at gmail.com
Fri Oct 30 15:22:50 UTC 2020
On 30/10/2020 15:40, Blake McBride wrote:
> I'd like to add that I care far, far less about "efficiently [implement
> atomic memory compare and swap operations" than I do about bug fixes and
> ANSI CL conformance. And it still seems like a lot of work is remaining
> in those areas.
How about the following solution? Apologies if it's obviously unworkable.
This is the issue:
which says it requires CAS on a few ABCL functions (svref etc.).
The valuable feature of CAS is that it doesn't require a context switch,
unlike Java's "synchronized". So let's weaken the requirement above
(very slightly, if at all) to "anything roughly as lightweight as CAS".
Presumably abcl-2 will use some new JDK11 CAS feature to implement svref
But it could use a "fallback-CAS" implementation when it finds itself on
an old JRE.
Say one built upon this (JDK5 feature) as a primitive:
As long as fallback-CAS spins and doesn't switch context, it'll meet the
weakened requirement above.
Then ABCL-2 will work fast on JDK11 and still almost as fast as that
even on older versions of Java.
I should probably read up on what specific JDK11 CAS feature abcl-2
relies upon, that doesn't exist in JDK8. I haven't kept up.
More information about the armedbear-devel