RFR: JDK-8312182: THPs cause huge RSS due to thread start timing issue [v3]

Poonam Bajaj poonam at openjdk.org
Thu Jul 20 14:02:44 UTC 2023


On Wed, 19 Jul 2023 15:59:27 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> src/hotspot/os/linux/os_linux.cpp line 936:
>> 
>>> 934:     // so that the stack does not get backed by a transparent huge page.
>>> 935:     if (HugePages::thp_pagesize() > 0 &&
>>> 936:         is_aligned(stack_size, HugePages::thp_pagesize())) {
>> 
>> Do we want to add this additional page even when the stack_size is less than the thp_pagesize?
>
> The aligned test should suffice: if stack size is aligned to THP page size, the smallest non-zero value is that pagesize. It cannot be 0, we would have noticed by now.

Yes, makes sense.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14919#discussion_r1269506974


More information about the hotspot-runtime-dev mailing list