RFR: 8013398: Adjust number of stack guard pages on systems with large memory page size

Vladimir Danushevsky vladimir.danushevsky at oracle.com
Fri Apr 26 17:34:52 PDT 2013

Please review the following change:



On a non-typical Linux system configuration with large page size (e.g. 64KB) significant amount of virtual memory is wasted to multiple guard pages when in fact that can be reduced to a single page per Red/Yellow/Shadow categories.
In some edge cases a minimal stack requirement is calculated higher than actual stack size specified by ThreadStackSize parameter causing VM to abort unless stack size is overwritten via -Xss option. 

A patch currently being suggested adjusts amount of guard pages to a single memory page each along with minimal stack size when memory page size exceed 8KB unless explicitly overwritten in command line. 

Currently we are aware of the problem on some Linux platforms, therefore the change is specific to that OS only (Solaris carries a similar approach already).

Shall the description string of StackRedPage, StackYellowPages and StackShadow pages be modified to reflect the values could be scaled down? If so the comment needs to indicate the change affects Linux and Solaris only. Any comments welcome here.


More information about the hotspot-dev mailing list