]> Cypherpunks repositories - gostls13.git/commit
runtime: disable scavenger on 64k page size kernels
authorDave Cheney <dave@cheney.net>
Thu, 26 Feb 2015 09:29:58 +0000 (20:29 +1100)
committerDave Cheney <dave@cheney.net>
Thu, 26 Feb 2015 20:11:17 +0000 (20:11 +0000)
commitf9cc72ccfef0e1aa68f8c726c430bb7e59b734a8
tree96133569d659f3e4ad4bac9d985ef7bd06a54e9d
parent045f9df466ac6d12a2be66a1c5d4659d113719bd
runtime: disable scavenger on 64k page size kernels

Update #9993

If the physical page size of the machine is larger than the logical
heap size, for example 8k logical, 64k physical, then madvise(2) will
round up the requested amount to a 64k boundary and may discard pages
close to the page being madvised.

This patch disables the scavenger in these situations, which at the moment
is only ppc64 and ppc64le systems. NaCl also uses a 64k page size, but
it's not clear if it is affected by this problem.

Change-Id: Ib897f8d3df5bd915ddc0b510f2fd90a30ef329ca
Reviewed-on: https://go-review.googlesource.com/6091
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
src/runtime/debug/garbage_test.go
src/runtime/mheap.go