RFR: 8321683: Tests fail with AssertionError in RangeWithPageSize
Thomas Stuefe
stuefe at openjdk.org
Tue Dec 19 13:19:46 UTC 2023
On Mon, 11 Dec 2023 18:18:46 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
> The test was recently changed to check the THPeligible value in the smaps file, instead of checking the hg flag. This was done because hg isn't set if the THP policy is set to 'always'. With that change I added an assert that if the "hg" flag is set, then THPeligible should also be set. This turns out to not be true, and the assert fails.
>
> My proposal is to check both properties and set isTHP to true if either is set. The isTHP property is later only used to make the page size checks more lenient in the presence of transparent huge pages.
As Arno mentioned, we need a workaround for older kernels. "THPeligible" has been introduced with linux 5.0. Older kernels won't have that thing.
Also, there has been a back and forth of patches that change the alignment of the output. So, make sure we work with `THPeligible: <any number of spaces> 1`.
Other than that, this is good. Scanning for both hg and THPeligible covers almost all cases.
I don't know why we used !HT. Does not seem to make much sense.
-------------
Changes requested by stuefe (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/17064#pullrequestreview-1788847918
More information about the hotspot-runtime-dev
mailing list