RFR: 8303215: Make thread stacks not use huge pages [v2]
Poonam Bajaj
poonam at openjdk.org
Fri May 26 20:20:57 UTC 2023
On Thu, 25 May 2023 18:16:44 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> Poonam Bajaj has updated the pull request incrementally with one additional commit since the last revision:
>>
>> call scan_default_large_page_size() in the beginning of large_page_init()
>
> src/hotspot/os/linux/os_linux.cpp line 932:
>
>> 930: // Add an additional page to the stack size to reduce its chances of getting large page aligned
>> 931: // so that the stack does not get backed by a transparent huge page.
>> 932: if (stack_size >= os::Linux::_default_large_page_size && is_aligned(stack_size, os::Linux::_default_large_page_size)) {
>
> Could you use `os::Linux::default_large_page_size()` instead of accessing the private member directly?
Resolved this.
> src/hotspot/os/linux/os_linux.cpp line 3628:
>
>> 3626: static size_t _large_page_size = 0;
>> 3627:
>> 3628: size_t os::Linux::scan_default_large_page_size() {
>
> I think this is not needed anymore, or? You can revert this back to a local static function, and call that in `os::large_page_init()`
Fixed this.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14105#discussion_r1207298620
PR Review Comment: https://git.openjdk.org/jdk/pull/14105#discussion_r1207299448
More information about the hotspot-runtime-dev
mailing list