runtime: assume 64kB physical pages on ARM
runtime: assume 64kB physical pages on ARM

Currently we assume the physical page size on ARM is 4kB. While this
is usually true, the architecture also supports 16kB and 64kB physical
pages, and Linux (and possibly other OSes) can be configured to use
these larger page sizes.

With Go 1.6, such a configuration could potentially run, but generally
resulted in memory corruption or random panics. With current master,
this configuration will cause the runtime to panic during init on
Linux when it checks the true physical page size (and will still cause
corruption or panics on other OSes).

However, the assumed physical page size only has to be a multiple of
the true physical page size, the scavenger can now deal with large
physical page sizes, and the rest of the runtime can deal with a
larger assumed physical page size than the true size. Hence, there's
little disadvantage to conservatively setting the assumed physical
page size to 64kB on ARM.

This may result in some extra memory use, since we can only return
memory at multiples of the assumed physical page size. However, it is
a simple change that should make Go run on systems configured for
larger page sizes. The following commits will make the runtime query
the actual physical page size from the OS, but this is a simple step
there.

Updates #12480.

Change-Id: I851829595bc9e0c76235c847a7b5f62ad82b5302
Reviewed-on: https://go-review.googlesource.com/25021
Run-TryBot: Austin Clements <7ea35d812706d9213868749011af1ed4fa2f6aa0@google.com>
TryBot-Result: Gobot Gobot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>
Reviewed-by: Minux Ma <72d850dbd8858b791995463d8539b5a379577f28@golang.org>

josharian/go,linux-on-ibm-z/go,nawawi/go,suncycheng/go,cloudflare/go,ImJasonH/go,derekmarcotte/go,nawawi/go,akutz/go,josharian/go,derekmarcotte/go,goodlang/good,polyverse-security/go,CAFxX/go,Cofyc/go,josharian/go,CAFxX/go,codestation/go,josharian/go,nawawi/go,linux-on-ibm-z/go,ImJasonH/go,polyverse-security/go,momchil-velikov/go,vsekhar/elastic-go,derekmarcotte/go,derekmarcotte/go,vsekhar/elastic-go,cloudflare/go,nawawi/go,derekmarcotte/go,akutz/go,goodlang/good,cloudflare/go,vsekhar/elastic-go,suncycheng/go,ImJasonH/go,golang/go,Cofyc/go,vsekhar/elastic-go,CAFxX/go,Cofyc/go,polyverse-security/go,nawawi/go,cloudflare/go,suncycheng/go,ImJasonH/go,goodlang/good,derekmarcotte/go,josharian/go,linux-on-ibm-z/go,CAFxX/go,momchil-velikov/go,codestation/go,ImJasonH/go,akutz/go,momchil-velikov/go,linux-on-ibm-z/go,cloudflare/go,cloudflare/go,ImJasonH/go,nawawi/go,akutz/go,polyverse-security/go,ImJasonH/go,nawawi/go,akutz/go,Cofyc/go,codestation/go,golang/go,CAFxX/go,codestation/go,golang/go,linux-on-ibm-z/go,Cofyc/go,nawawi/go,linux-on-ibm-z/go,momchil-velikov/go,momchil-velikov/go,suncycheng/go,christopher-henderson/Go,suncycheng/go,polyverse-security/go,momchil-velikov/go,goodlang/good,josharian/go,codestation/go,akutz/go,cloudflare/go,josharian/go,momchil-velikov/go,suncycheng/go,derekmarcotte/go,suncycheng/go,suncycheng/go,Cofyc/go,golang/go,golang/go,CAFxX/go,cloudflare/go,polyverse-security/go,vsekhar/elastic-go,vsekhar/elastic-go,codestation/go,Cofyc/go,ImJasonH/go,goodlang/good,akutz/go,codestation/go,CAFxX/go,polyverse-security/go,goodlang/good,golang/go,josharian/go,vsekhar/elastic-go,goodlang/good,linux-on-ibm-z/go,golang/go,CAFxX/go,polyverse-security/go,linux-on-ibm-z/go,codestation/go,goodlang/good,Cofyc/go,momchil-velikov/go,derekmarcotte/go,vsekhar/elastic-go,golang/go,akutz/go