[jdk20] RFR: 8298642: ParallelGC -XX:+UseNUMA eden spaces allocated on wrong node

Nick Gasson ngasson at openjdk.org
Wed Dec 21 09:58:59 UTC 2022


On Tue, 20 Dec 2022 22:49:22 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

> > In bias_region() we call os::free_memory() to uncommit a range of pages
> 
> Just for the record, `os::free_memory()` does not uncommit any mem. Instead, it calls `commit_memory` to overwrite existing mmapings.

Doesn't it? I think `mmap`-ing over an existing mapping has the effect of freeing the physical pages backing it, allowing them to be allocated again on a different node the next time they are touched. Otherwise setting the NUMA node hint with `os::numa_make_local` doesn't have any effect if physical pages are already allocated as Linux won't migrate pages unless you call `move_pages`. Certainly if I call `os::numa_get_group_id_for_address` after `os::free_memory` it always returns -1 (not allocated on any node).

-------------

PR: https://git.openjdk.org/jdk20/pull/33


More information about the hotspot-gc-dev mailing list