RFR(XL): 8220310: Implementation: NUMA-Aware Memory Allocation for G1, Mutator (1/3)
Thomas Schatzl
thomas.schatzl at oracle.com
Wed Oct 30 08:02:07 UTC 2019
Hi,
On 30.10.19 08:25, Stefan Johansson wrote:
>
>
>> 29 okt. 2019 kl. 21:39 skrev sangheon.kim at oracle.com:
>>
>> 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
> Looks good,
> Stefan
+1
Thomas
More information about the hotspot-gc-dev
mailing list