RFR: 8225035: Thread stack size issue caused by large TLS size

Florian Weimer fweimer at redhat.com
Tue Jun 18 07:14:04 UTC 2019


* Jiangli Zhou:

> Hi Andrew and Florian,
>
> With the stack size needs to be aligned at page boundary, it seems that the effect of using
> large page size is the same for the following two approaches:
>
> 1 Using a JVM knob which specifies a minimum stack size for stack size adjustment
>  (suggested by Florian)
> 2 Using the value obtained from __pthread_get_minstack for stack size adjustment 

Approach 2 does not work if code needs more stack space than initially
planned for other reasons besides increased static TLS use by the
process.  For example, a newer CPU might require storing additional data
on the stack during some operations (such as signal delivery).

Approach 1 would work in these cases as well, so I expect that you will
need it eventually.

Thanks,
Florian


More information about the hotspot-runtime-dev mailing list