RFR: 8303215: Make thread stacks not use huge pages
Poonam Bajaj
poonam at openjdk.org
Tue May 23 18:44:55 UTC 2023
On Tue, 23 May 2023 18:39:17 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
> Yes, this is a pragmatic workaround. I believe @theRealAph recommended the same solution.
>
> Did you test this on an aarch64 kernel with 64k pages? I suspect the 2040 default size only works for 4k or 8k pages, for larger page sizes pthread_create would just round up the stack size again to 2MB.
This does not solve the problem when the default small page size is 64K. The stack size gets rounded up to 2048K.
JavaThread:
0000ffff18ff0000 192 0 0 ----- [ anon ]
0000ffff19020000 1856 192 192 rw--- [ anon ]
0000ffff191f0000 192 0 0 ----- [ anon ]
0000ffff19220000 1856 192 192 rw--- [ anon ]
0000ffff193f0000 192 0 0 ----- [ anon ]
0000ffff19420000 1856 192 192 rw--- [ anon ]
non-JavaThread:
0000ffff6c170000 64 0 0 ----- [ anon ]
0000ffff6c180000 2048 64 64 rw--- [ anon ]
0000ffff6c380000 64 0 0 ----- [ anon ]
0000ffff6c390000 2048 64 64 rw--- [ anon ]
For 64k page size, changing the stack size to 1920K (2048 - 2*64) would work:
0000fffdc5ba0000 192 0 0 ----- [ anon ]
0000fffdc5bd0000 1728 192 192 rw--- [ anon ]
0000fffdc5d80000 192 0 0 ----- [ anon ]
0000fffdc5db0000 1728 192 192 rw--- [ anon ]
0000fffdc5f60000 192 0 0 ----- [ anon ]
0000fffdc5f90000 1728 192 192 rw--- [ anon ]
-------------
PR Comment: https://git.openjdk.org/jdk/pull/14105#issuecomment-1559959246
More information about the hotspot-runtime-dev
mailing list