JVM inserting guard pages into stack of initial thread - will that stop with Java 10?

Andrew Haley aph at redhat.com
Tue Oct 24 09:23:51 UTC 2017


On 23/10/17 18:25, Doerr, Martin wrote:

> after reading several mails about guard page problems (and quite
> some own bad experience), I wonder if they are really worth all the
> pain. Is the performance benefit from stack banging so great, that
> it justifies the tremendous complexity?
> 
> If not, I'd vote for replacing them by explicit checks. Loading a
> limit from the Thread and performing a comparison doesn't sound so
> expensive.
> 
> It could be the case that some platforms need banging (e.g. Windows
> due to on demand committed stack), but probably not all.
> Am I missing anything?

I think you should try it and tell us the results.  If we have
power-of-2 stack sizes it can be done without any loads at all, but
that's probably too restrictive, and we've had quite enough
tricksiness.  It's hard to beat the speed of a simple store, though.

-- 
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671


More information about the hotspot-runtime-dev mailing list