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

David Holmes dholmes at openjdk.org
Wed Apr 26 01:44:55 UTC 2023


On Sun, 23 Apr 2023 01:39:56 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> I would it prefer if this switch were named like the behaviour we probe for, not the action that results from it. E.g. "_glibc_includes_guards_in_stack_size". Also makes it clearer that this is a glibc-only thing. And I agree with @shipilev that this looks like a flag. I sometimes prefix local globals with `g_`.
>> 
>> But its up to you.
>
> <sigh>

I've addressed the naming concerns by using an accessor: 
  `bool os::Linux::adjustStackSizeForGuardpages()`
which access a file local static variable

Ive addressed the init lifecycle concern by folding `get_minstack_init()` into `init_adjust_stacksize_for_guard_pages()`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13571#discussion_r1177219557


More information about the hotspot-runtime-dev mailing list