RFR(XL): 8220310: Implementation: NUMA-Aware Memory Allocation for G1, Mutator (1/3)
Kim Barrett
kim.barrett at oracle.com
Wed Oct 30 14:18:30 UTC 2019
> On Oct 29, 2019, at 4:39 PM, sangheon.kim at oracle.com wrote:
>
> Hi Kim and Per,
>
> Thanks for your reviews.
>
> -----------
> To all reviewers,
>
> Stefan suggested a safer handling of node index so here's another webrev.
> Basically when we enable AlwaysPreTouch, we expect to get actual node id of the address.
> However, in theory we still may get something unknown id. So below change is added to have safer handling of node index.
>
> uint G1NUMA::index_for_region(HeapRegion* hr) const {
> if (!is_enabled()) {
> return 0;
> }
>
>
> if (AlwaysPreTouch) {
> // If we already pretouched, we can check actual node index here.
> - return index_of_address(hr->bottom());
>
> + // However, if node index is still unknown, use preferred node index.
> + uint node_index = index_of_address(hr->bottom());
> + if (node_index != UnknownNodeIndex) {
> + return node_index;
> + }
>
> Webrev:
> http://cr.openjdk.java.net/~sangheki/8220310/webrev.8
> http://cr.openjdk.java.net/~sangheki/8220310/webrev.8.inc
> Testing: local build
Looks good.
More information about the hotspot-gc-dev
mailing list