RFR: 8229147: Linux os::create_thread() overcounts guardpage size with newer glibc (>=2.27) [v2]

Thomas Stuefe stuefe at openjdk.org
Wed Apr 26 05:56:24 UTC 2023


On Wed, 26 Apr 2023 02:24:23 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> We can now detect whether glibc includes the guard pages as part of the requested stack size or not, and so only need to make adjustments when glibc requires it.
>> 
>> The intent was to use a local variable as the "flag" but unfortunately it is also needed in os_posix.cpp so I had to make it part of the os::Linux API.
>> 
>> See bug report (and related) for details.
>> 
>> Testing:
>>   - Manually checked log output for stack sizes and boundaries on systems with and without the glibc fix. (Again see JBS issue)
>>   -  Tiers 1-3 sanity
>> Thanks
>
> David Holmes has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Review comments

Still good. Thanks for taking in my input.

About "stack size does not matter", the sources I looked at were the upstream glibc sources. I did not check any downstream vendor ones, e.g. if IBM changed the logic on 64k paged ppc glibc. But if that is a problem, it can be fixed later.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/13571#issuecomment-1522814127


More information about the hotspot-runtime-dev mailing list