]> Cypherpunks repositories - gostls13.git/commitdiff
doc: add release notes for allocation headers
authorMichael Anthony Knyszek <mknyszek@google.com>
Thu, 30 Nov 2023 19:36:46 +0000 (19:36 +0000)
committerMichael Knyszek <mknyszek@google.com>
Fri, 1 Dec 2023 21:50:23 +0000 (21:50 +0000)
For #61422.

Change-Id: Ia7cb2721e52d9ccd932a49e0c331868eb7749f94
Reviewed-on: https://go-review.googlesource.com/c/go/+/546027
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

doc/go1.22.html

index 0d358b804696f077efe7d8f463b457d85f3bc481..9ef372164eff0ccaa0db99c468803b7564952a49 100644 (file)
@@ -83,8 +83,26 @@ Do not send CLs removing the interior tags from such phrases.
 
 <h2 id="runtime">Runtime</h2>
 
-<p>
-  TODO: complete this section, or delete if not needed
+<p><!-- CL 543255 -->
+  The runtime now keeps type-based garbage collection metadata nearer to each
+  heap object, improving the CPU performance (latency or throughput) of Go programs
+  by 1&mdash;3%.
+  This change also reduces the memory overhead of the majority Go programs by
+  approximately 1% by deduplicating redundant metadata.
+  Some programs may see a smaller improvement because this change adjusts the size
+  class boundaries of the memory allocator, so some objects may be moved up a size
+  class.
+  <br />
+  A consequence of this change is that some objects' addresses that were previously
+  always aligned to a 16 byte (or higher) boundary will now only be aligned to an 8
+  byte boundary.
+  Some programs that use assembly instructions that require memory addresses to be
+  more than 8-byte aligned and rely on the memory allocator's previous alignment behavior
+  may break, but we expect such programs to be rare.
+  Such programs may be built with <code>GOEXPERIMENT=noallocheaders</code> to revert
+  to the old metadata layout and restore the previous alignment behavior, but package
+  owners should update their assembly code to avoid the alignment assumption, as this
+  workaround will be removed in a future release.
 </p>
 
 <h2 id="compiler">Compiler</h2>
@@ -517,10 +535,6 @@ Do not send CLs removing the interior tags from such phrases.
     <p><!-- https://go.dev/issue/61015 -->
       TODO: <a href="https://go.dev/issue/61015">https://go.dev/issue/61015</a>: change mutex profile to scale contention by number of blocked goroutines
     </p>
-
-    <p><!-- CL 543255 -->
-      TODO: <a href="https://go.dev/cl/543255">https://go.dev/cl/543255</a>: runtime: put allocation headers back at the start the object
-    </p>
   </dd>
 </dl><!-- runtime -->