Spin Loop Hint support: Draft JEP proposal

Gil Tene gil at azul.com
Wed Oct 7 20:21:37 UTC 2015


> On Oct 7, 2015, at 8:51 AM, Andrew Haley <aph at redhat.com> wrote:
> 
> On 10/07/2015 04:45 PM, Gil Tene wrote:
> 
>> For ARM, I expect WFE/SEV to need to evolve as well, and for other
>> reasons, even fit use within OSs. The current WFE/SEV scheme is not
>> scalable. While it probably works ok for spinning at the kernel
>> level on hardware that only has s handful of cores, the fact that
>> the event WFE waits for (and SEV sends) is global to the system will
>> break things as core counts grow (it is the hardware equivalent of
>> wait/notifyAll() with a single global monitor).
> 
> That's not how it works.  It's sufficient to write to the lock word to
> wake a core from a WFE: SEV is not required.  Each core has its own
> event monitor, and wakeup is handled by the cache coherency logic.
> 
> Andrew.

Interesting. I was going off of the 32 bit ARM documentation. Looks like
ARMv8 improved on that, and did it implicitly (without requiring different
instructions).

You can see the differences on the unlock path between the 32 bit and 64 bit implementations here:
http://lxr.free-electrons.com/source/arch/arm/include/asm/spinlock.h
http://lxr.free-electrons.com/source/arch/arm64/include/asm/spinlock.h



More information about the hotspot-dev mailing list