runtime: delete redundant code in the page allocator

The page allocator's scavenge index has sysGrow called on it twice,
once in pageAlloc.grow, and once in pageAlloc.sysGrow on 64-bit
platforms. Calling it twice is OK since sysGrow is idempotent,
but it's also wasteful. This change removes the call
in pageAlloc.sysGrow.

Change-Id: I5b955b6e2beed5c2b8305ab82b76718ea305792c
Reviewed-on: https://go-review.googlesource.com/c/go/+/707735
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
This commit is contained in:
tony 2025-09-29 14:25:57 +00:00 committed by Keith Randall
parent 719dfcf8a8
commit 4fca79833f

View file

@ -180,9 +180,6 @@ func (p *pageAlloc) sysGrow(base, limit uintptr) {
sysUsed(unsafe.Pointer(need.base.addr()), need.size(), need.size())
p.summaryMappedReady += need.size()
}
// Update the scavenge index.
p.summaryMappedReady += p.scav.index.sysGrow(base, limit, p.sysStat)
}
// sysGrow increases the index's backing store in response to a heap growth.