]> Cypherpunks repositories - gostls13.git/commit
runtime: overestimate the amount of allocated memory in heapLive
authorMichael Anthony Knyszek <mknyszek@google.com>
Thu, 7 Jul 2022 20:01:21 +0000 (20:01 +0000)
committerMichael Knyszek <mknyszek@google.com>
Thu, 7 Jul 2022 21:15:48 +0000 (21:15 +0000)
commit1ebc983000ed411a1c06f6b8a61770be1392e707
tree4f6db80ea3b089a54ee34456e2ea5a50d07656b6
parentc177d9d98a7bfb21346f6309c115d0a2bf3167e3
runtime: overestimate the amount of allocated memory in heapLive

CL 377516 made it so that memory metrics are truly monotonic, but also
updated how heapLive tracked allocated memory to also be monotonic.

The result is that cached spans with allocated memory aren't fully
accounted for by the GC, causing it to make a worse assumption (the
exact mechanism is at this time unknown), resulting in a memory
regression, especially for smaller heaps.

This change is a partial revert of CL 377516 that makes heapLive a
non-monotonic overestimate again, which appears to resolve the
regression.

For #53738.

Change-Id: I5c51067abc0b8e0a6b89dd8dbd4a0be2e8c0c1b2
Reviewed-on: https://go-review.googlesource.com/c/go/+/416417
Reviewed-by: Michael Pratt <mpratt@google.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/runtime/mcache.go