]> Cypherpunks.ru repositories - gostls13.git/commit
runtime: fix hard goal calculation
authorMichael Anthony Knyszek <mknyszek@google.com>
Thu, 4 Nov 2021 21:09:34 +0000 (21:09 +0000)
committerMichael Knyszek <mknyszek@google.com>
Thu, 4 Nov 2021 21:41:49 +0000 (21:41 +0000)
commit156abe51221c5723c3ff524ea0fcbe65d8272bfa
tree418f208d07ef8d7bce29a523cdc3a212454b3921
parent2c32f29f2f88e56f329547467090e7315cd3c1e8
runtime: fix hard goal calculation

The new GC pacer has a bug where the hard goal isn't set in relation to
the original heap goal, but rather to the one already extrapolated for
overshoot.

In practice, I have never once seen this case arise because the
extrapolated goal used for overshoot is conservative. No test because
writing a test for this case is impossible in the idealized model the
pacer tests create. It is possible to simulate but will take more work.
For now, just leave a TODO.

Change-Id: I24ff710016cd8100fad54f71b2c8cdea0f7dfa79
Reviewed-on: https://go-review.googlesource.com/c/go/+/361435
Reviewed-by: Michael Pratt <mpratt@google.com>
Trust: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
src/runtime/mgcpacer.go
src/runtime/mgcpacer_test.go