[patch] Shark reroute LLVM atomic intrinsics to Zero
aph at redhat.com
Mon Mar 30 02:23:28 PDT 2009
Xerxes Rånby wrote:
> Andrew Haley skrev:
>> Robert Schuster wrote:
>>> Xerxes Rånby schrieb:
>>>> This patch will make shark reroute LLVM atomic intrinsics to the
>>>> existing atomic operations implemented in Zero.
>>>> This patch are both platform and arch independent.
>>>> I have tested this patch on Shark compiled for X86, PPC and ARM.
>>> I would make this rerouting optional depending on the architecture.
>>> LLVM has atomic intrinsic fucntion support for x86(-64), powerpc (32,64)
>>> and alpha. On those architectures you really want to use what LLVM
>>> E.g. on x86 the function is converted into a series of machine
>>> instructions and no function call.
>> Definitely; we really don't want a function call just do do an atomic
>> cmpxchg. This is really just a workaround for an llvm bug, and hopefully
>> it'll soon go away.
> I have done a small investigation to see how large the cost is to use
> the reroute patch on PPC.
> The test machine is a PowerBook G4 1.333Ghz with F10 installed.
> I used Caffeine Mark 3.0 for this benchmark, why? It is a quick
> benchmark and it includes some graphics tests so it is quite fun to
> benchmark with.
And, perhaps unsurprisingly, it doesn't use java.lang.concurrent.*
at all. :-)
Really, the use of lock-free in Java is only just beginning; in the
future I expect it'll be the obvious way to do things.
More information about the zero-dev