mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: scavenge huge spans first
This change adds two new treap iteration types: one for large unscavenged spans (contain at least one huge page) and one for small unscavenged spans. This allows us to scavenge the huge spans first by first iterating over the large ones, then the small ones. Also, since we now depend on physHugePageSize being a power of two, ensure that that's the case when it's retrieved from the OS. For #30333. Change-Id: I51662740205ad5e4905404a0856f5f2b2d2a5680 Reviewed-on: https://go-review.googlesource.com/c/go/+/174399 Run-TryBot: Michael Knyszek <mknyszek@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
This commit is contained in:
parent
fa8470a8cd
commit
a62b5723be
5 changed files with 57 additions and 25 deletions
|
|
@ -550,6 +550,7 @@ type TreapIterType treapIterType
|
|||
|
||||
const (
|
||||
TreapIterScav TreapIterType = TreapIterType(treapIterScav)
|
||||
TreapIterHuge = TreapIterType(treapIterHuge)
|
||||
TreapIterBits = treapIterBits
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue