JDK-8298642 : ParallelGC -XX:+UseNUMA eden spaces allocated on wrong node
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 19,20
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • Submitted: 2022-12-13
  • Updated: 2025-06-23
  • Resolved: 2022-12-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 20 JDK 21
20 b29Fixed 21Fixed
Related Reports
Relates :  
Relates :  
Description
I noticed this when implementing JDK-8298482. If UseAdaptiveSizePolicy and/or UseAdaptiveNUMAChunkSizing are enabled and UseLargePages is *not* enabled, part of the eden spaces managed by MutableNUMASpace end up bound to the wrong node. This seems to be a regression caused by JDK-8283935, specifically the addition of

  set_page_size(alignment());

to MutableNUMASpace::initialize(). Previously the page size would have been equal to os::vm_page_size() unless UseLargePages was enabled.

In bias_region() we call os::free_memory() to uncommit a range of pages so that they can be later allocated on a different node. We pass page_size() as the alignment_hint argument. However on Linux this does nothing if alignment_hint is greater than os::vm_page_size() and THP is not enabled, so the pages always remain bound to their original node (see os::pd_free_memory() in os_linux.cpp).

I think the solution here is to pass os::vm_page_size() as the alignment_hint when UseLargePages is disabled.
Comments
Changeset: 81933b7a Author: Nick Gasson <ngasson@openjdk.org> Date: 2022-12-21 11:00:48 +0000 URL: https://git.openjdk.org/jdk20/commit/81933b7a927c1579eda7b6678901e5d2bc1c1aed
21-12-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk20/pull/33 Date: 2022-12-14 14:23:01 +0000
14-12-2022