Skip to content

Commit 41b643a

Browse files
committed
Move setting of allocation NUMA id to allocation path
1 parent f6fd2ed commit 41b643a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/hotspot/share/gc/z/zPageAllocator.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class ZPageAllocation : public StackObj {
8888
_old_seqnum(ZGeneration::old()->seqnum()),
8989
_harvested(0),
9090
_committed(0),
91-
_numa_id(ZNUMA::id()),
91+
_numa_id(-1),
9292
_claimed_mappings(1),
9393
_node(),
9494
_stall_result() {}
@@ -708,6 +708,8 @@ bool ZPageAllocator::claim_physical_or_stall(ZPageAllocation* allocation) {
708708
{
709709
ZLocker<ZLock> locker(&_lock);
710710

711+
// Always start at the current thread's affinity for local allocation
712+
allocation->set_numa_id(ZNUMA::id());
711713
if (claim_physical_round_robin(allocation)) {
712714
return true;
713715
}

0 commit comments

Comments
 (0)