RFR: 8324580: SIGFPE on THP initialization on kernels < 4.10 [v3]
Zdenek Zambersky
zzambers at openjdk.org
Wed Jan 31 16:49:02 UTC 2024
On Wed, 31 Jan 2024 06:43:23 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> Zdenek Zambersky has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fixed whitespace error
>
> src/hotspot/os/linux/os_linux.cpp line 3879:
>
>> 3877: _large_page_size = HugePages::thp_pagesize();
>> 3878: if (_large_page_size == 0) {
>> 3879: // Unknown THP page size => falback to default static hugepage size
>
> Typo falback
Comments updated with resolution of the other thread.
> src/hotspot/os/linux/os_linux.cpp line 3885:
>
>> 3883: return;
>> 3884: }
>> 3885: _large_page_size = MIN2(HugePages::default_static_hugepage_size(), 16 * M);
>
> The more I think about this, the more I doubt my own advice. What I wrote before is still true, but it may confuse users to see a page size of 16MB pop up in log files and somesuch, e.g. on intel systems.
>
> Could you please modify this code like this:
>
>
> if (_large_page_size == 0) {
> // Older kernels won't publish the THP page size. Fall back to default static huge page size,
> // since that is likely to be the THP page size as well. Don't do it if the page size is considered
> // too large to avoid large alignment waste.
> log_info(pagesize) ("Cannot determine THP page size (kernel < 4.0 ?)");
> if (HugePages::supports_static_hugepages() &&
> HugePages::default_static_hugepage_size() <= 16 * M) {
> _large_page_size = HugePages::default_static_hugepage_size();
> } else {
> warn_no_large_pages_configured();
> UseLargePages = UseTransparentHugePages = false;
> return;
> }
> }
>
>
> and then mirror this logic in the test please.
I have updated this code and test. (just with inverted if, and fixed kernel version to 4.10)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17545#discussion_r1473143031
PR Review Comment: https://git.openjdk.org/jdk/pull/17545#discussion_r1473139671
More information about the hotspot-runtime-dev
mailing list