From b03d12176d22f49f557fc174645ded22d91e6f28 Mon Sep 17 00:00:00 2001 From: Michael Anthony Knyszek Date: Mon, 22 May 2023 19:23:21 +0000 Subject: [PATCH] doc: write various runtime-related release notes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This includes release notes for several small runtime changes, including runtime/trace and runtime package changes. For #58645. Change-Id: I3e9c804da1bb6b385088e16a20d9576c11098021 Reviewed-on: https://go-review.googlesource.com/c/go/+/497095 Auto-Submit: Michael Knyszek Reviewed-by: Austin Clements TryBot-Result: Gopher Robot Reviewed-by: Ansiwen Reviewed-by: Felix Geisendörfer Run-TryBot: Michael Knyszek Reviewed-by: Michael Pratt --- doc/go1.21.html | 56 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/doc/go1.21.html b/doc/go1.21.html index 1cf4bfe1a2..ad84fa04a7 100644 --- a/doc/go1.21.html +++ b/doc/go1.21.html @@ -51,6 +51,8 @@ Do not send CLs removing the interior tags from such phrases.

+

WebAssembly

+

@@ -61,6 +63,13 @@ Do not send CLs removing the interior tags from such phrases.

+ +

+ The Go scheduler now interacts much more efficiently with the + JavaScript event loop, especially in applications that block + frequently on asynchronous events. +

+

WebAssembly System Interface

@@ -121,6 +130,27 @@ Do not send CLs removing the interior tags from such phrases. valuable for debugging stack overflows.

+

+ On Linux platforms that support transparent huge pages, the Go runtime + now manages which parts of the heap may be backed by huge pages more + explicitly. This leads to better utilization of memory: small heaps + should see less memory used (up to 50% in pathological cases) while + large heaps should see fewer broken huge pages for dense parts of the + heap, improving CPU usage and latency by up to 1%. +

+ +

+ As a result of runtime-internal garbage collection tuning, + applications may see up to a 40% reduction in application tail latency + and a small decrease in memory use. Some applications may also observe + a small loss in throughput. + + The memory use decrease should be proportional to the loss in + throughput, such that the previous release's throughput/memory + tradeoff may be recovered (with little change to latency) by + increasing GOGC and/or GOMEMLIMIT slightly. +

+

Compiler

@@ -638,9 +668,35 @@ Do not send CLs removing the interior tags from such phrases.

TODO: https://go.dev/cl/474915: runtime: support GOTRACEBACK=wer on Windows

+ +

+ A new type Pinner has been added to the runtime + package. Pinners may be used to "pin" Go memory + such that it may be used more freely by non-Go code. For instance, + passing Go values that reference pinned Go memory to C code is + now allowed. Previously, passing any such nested reference was + disallowed by the + cgo pointer passing rules. + + See the docs for more details. +

+
runtime/trace
+
+

+ Collecting traces on amd64 and arm64 now incurs a substantially + smaller CPU cost: up to a 10x improvement over the previous release. +

+ +

+ Traces now contain explicit stop-the-world events for every reason + the Go runtime might stop-the-world, not just garbage collection. +

+
+
+
slices