Skip to content

Commit

Permalink
[release-branch.go1.7] runtime: fix check for vacuous page boundary r…
Browse files Browse the repository at this point in the history
…ounding again

The previous fix for this, commit 336dad2, had everything right in
the commit message, but reversed the test in the code. Fix the test in
the code.

This reversal effectively disabled the scavenger on large page systems
*except* in the rare cases where this code was originally wrong, which
is why it didn't obviously show up in testing.

Fixes #16644. Again. :(

Change-Id: I27cce4aea13de217197db4b628f17860f27ce83e
Reviewed-on: https://go-review.googlesource.com/27402
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-on: https://go-review.googlesource.com/28631
Run-TryBot: Chris Broadfoot <cbro@golang.org>
  • Loading branch information
aclements authored and broady committed Sep 7, 2016
1 parent 24f46bd commit 40712a9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/runtime/mheap.go
Expand Up @@ -917,7 +917,9 @@ func scavengelist(list *mSpanList, now, limit uint64) uintptr {
// more memory than we want.)
start = (start + sys.PhysPageSize - 1) &^ (sys.PhysPageSize - 1)
end &^= sys.PhysPageSize - 1
if start == end {
if end <= start {
// start and end don't span a
// whole physical page.
continue
}
}
Expand Down

0 comments on commit 40712a9

Please sign in to comment.