RFR: 8261527: Record page size used for underlying mapping in ReservedSpace
Ivan Walulya
iwalulya at openjdk.java.net
Mon May 3 13:08:51 UTC 2021
On Thu, 29 Apr 2021 20:38:19 GMT, Stefan Johansson <sjohanss at openjdk.org> wrote:
> Please review this change to use the actual page size rather than `bool large` when creating and initializing `ReservedSpace`. This allows us to then get rid of the helper `ReservedSpace::actual_reserved_page_size()` and instead use the "real" page size for logging and other use.
>
> The PR consist of two commits, one that changes `ReservedSpace` to use and store a page size and one that removes `actual_reserved_page_size()` and instead uses `ReservedSpace::page_size()`. Hopefully this might help ease the review a bit.
>
> There are two changes in behavior:
> * In `JfrVirtualMemorySegment::initialize()` we now always pass down `os::vm_page_size()` which means never use large pages. This differs from the old condition where large pages were enabled if transparent huge pages were enabled. This change has been discussed with the JFR team and they will later investigate how to re-enable large page use.
> * In `ReservedSpace::reserve()`, if a file is used, the page size is always set to `os::vm_page_size()`. So when logging the page_size for such mapping it will not report a large page size. This was incorrectly done in the past when using `ReservedSpace::actual_reserved_page_size()` to figure out the page size. This makes the `runtime/os/TestTracePageSizes.java` test pass even if run with `-XX:AllocateHeapAt=/tmp`.
>
> **Testing**
> Mach5 tier1-4 and a lot of local testing.
lgtm!
-------------
Marked as reviewed by iwalulya (Committer).
PR: https://git.openjdk.java.net/jdk/pull/3802
More information about the shenandoah-dev
mailing list