Spin Loop Hint support: Draft JEP proposal

Andrew Haley aph at redhat.com
Mon Oct 5 09:41:52 UTC 2015

Hi Gil,

On 04/10/15 17:22, Gil Tene wrote:

> Summary
> Add an API that would allow Java code to hint that a spin loop is
> being executed.

I don't think this will work for ARM, which has a rather different
spinlock mechanism.

Instead of PAUSE, we wait on a lock word with WFE.  WFE puts a core
into a lightweight sleep state waiting on a particular address (the
lock word) and a write to the lock word wakes it up.  This is very
useful and somewhat analogous to 86's MONITOR/MWAIT.

I can't immediately see how to generalize your proposal to ARM, which
is a shame.


More information about the core-libs-dev mailing list