]> Cypherpunks repositories - gostls13.git/commit
runtime: define maximum supported physical page and huge page sizes
authorMichael Anthony Knyszek <mknyszek@google.com>
Thu, 7 Nov 2019 21:14:37 +0000 (21:14 +0000)
committerMichael Knyszek <mknyszek@google.com>
Fri, 8 Nov 2019 16:35:48 +0000 (16:35 +0000)
commitffb5646fe0134af80273df57ef251d705d004425
tree8747c932e6126d4cef0556e6969cc7daf9ef908e
parenta782472dcd3937d8e49ab843dffc7568c6eb8edb
runtime: define maximum supported physical page and huge page sizes

This change defines a maximum supported physical and huge page size in
the runtime based on the new page allocator's implementation, and uses
them where appropriate.

Furthemore, if the system exceeds the maximum supported huge page
size, we simply ignore it silently.

It also fixes a huge-page-related test which is only triggered by a
condition which is definitely wrong.

Finally, it adds a few TODOs related to code clean-up and supporting
larger huge page sizes.

Updates #35112.
Fixes #35431.

Change-Id: Ie4348afb6bf047cce2c1433576d1514720d8230f
Reviewed-on: https://go-review.googlesource.com/c/go/+/205937
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/runtime/malloc.go
src/runtime/mgcscavenge.go
src/runtime/mgcscavenge_test.go
src/runtime/mheap.go