RFR(xxs): 8187230: [aix] Leave OS guard page size at default for non-java threads instead of explicitly setting it

Lindenmaier, Goetz goetz.lindenmaier at sap.com
Fri Sep 8 07:51:27 UTC 2017


Hi Chris,

on linux the pthread implementation is a bit strange, or buggy.
It takes the OS guard pages out of the stack size specified.
We need to set it so we can predict the additional space 
that must be allocated for the stack.

See also the comment in os_linux.cpp, create_thread().

Best regards,
  Goetz.

> -----Original Message-----
> From: ppc-aix-port-dev [mailto:ppc-aix-port-dev-bounces at openjdk.java.net]
> On Behalf Of Chris Plummer
> Sent: Thursday, September 07, 2017 11:07 PM
> To: Thomas Stüfe <thomas.stuefe at gmail.com>; ppc-aix-port-
> dev at openjdk.java.net
> Cc: HotSpot Open Source Developers <hotspot-dev at openjdk.java.net>
> Subject: Re: RFR(xxs): 8187230: [aix] Leave OS guard page size at default for
> non-java threads instead of explicitly setting it
> 
> Hi Thomas,
> 
> Is there a reason this shouldn't also be done for linux?
> 
> thanks,
> 
> Chris
> 
> On 9/7/17 3:02 AM, Thomas Stüfe wrote:
> > Hi all,
> >
> > may I please have a review for this small change:
> >
> > Bug:
> > https://bugs.openjdk.java.net/browse/JDK-8187230
> >
> > Webrev:
> > http://cr.openjdk.java.net/~stuefe/webrevs/8187230-aix-
> > leave-os-guard-page-size-at-default-for-non-java-
> threads/webrev.00/webrev/
> >
> > The change is very subtle.
> >
> > Before, we would set the OS guard page size for every thread - for java
> > threads disable them, for non-java threads we'd set them to 4K.
> >
> > Now, we still disable them for java threads but leave them at the OS
> > default size for non-java threads.
> >
> > The really important part is the disabling of OS guard pages for java
> > threads, where we have a VM guard pages in place and do not want to
> spend
> > more memory on OS guards. We do not really care for the exact size of the
> > OS guard pages for non-java threads, and therefore should not set it - we
> > should leave the size in place the OS deems sufficient. That also spares us
> > the complexity of handling the thread stack page size, which on AIX may be
> > different from os::vm_page_size().
> >
> > Thank you and Kind Regards, Thomas
> 
> 



More information about the hotspot-dev mailing list