go.arm64 icon indicating copy to clipboard operation
go.arm64 copied to clipboard

arm64, malloc: Support 64KB pages

Open stevecapperlinaro opened this issue 10 years ago • 4 comments

Hi, This is my attempt to fix the issues I was having running go on 64KB pages on my Seattle board, #147 . As is evident from my patch, I am not a go programmer ;-). Please do tidy this up if it needs it. Also, if there is already a 64KB fix out there that I've missed, then please sling it my way and I would be happy to test it here.

Cheers, Steve

On arm64 we can run with 64KB pages as well as 4KB pages. Unfortunately, the memory allocator in go assumes pages are of size 4KB and we run into problems such as: runtime: address space conflict: map(0x4000001000) = 0x3ff7e090000 fatal error: runtime: address space conflict

This patch increases the _PageShift to 16 for arm64 and also beefs up the _StackCacheSize to one page for arm64.

I have tested this patch on an AMD Seattle system running 64KB pages and 4.0-rc5 kernel as well as an APM Mustang system running 4KB pages and 3.19 kernel.

I don't know why this hasn't arisen in PowerPC, perhaps a lucky set of addresses back from mmap? Perhaps this patch could be extended for PowerPC too if need be?

Signed-off-by: Steve Capper [email protected]

stevecapperlinaro avatar Mar 25 '15 13:03 stevecapperlinaro

Thanks for taking a pass on this, it's not really enough, some more bits are missing, but thanks.

4ad avatar Mar 25 '15 20:03 4ad

Steve, would you be able to contribute a 64k page size builder to the build dashboard, build.golang.org ?

davecheney avatar Mar 25 '15 20:03 davecheney

Hi guys, thanks for your feedback. I'll step back to testing :-). @davecheney, how does one contribute a builder? Does the machine have to be dedicated, or is it enough to schedule a job somewhere that can check in with build.golang.org?

stevecapperlinaro avatar Mar 27 '15 15:03 stevecapperlinaro

Start here, https://github.com/golang/go/wiki/DashboardBuilders

email [email protected] for a builder key,

let me know if you get stuck

On Sat, Mar 28, 2015 at 2:17 AM, stevecapperlinaro <[email protected]

wrote:

Hi guys, thanks for your feedback. I'll step back to testing :-). @davecheney https://github.com/davecheney, how does one contribute a builder? Does the machine have to be dedicated, or is it enough to schedule a job somewhere that can check in with build.golang.org?

— Reply to this email directly or view it on GitHub https://github.com/4ad/go/pull/148#issuecomment-86971542.

davecheney avatar Mar 29 '15 12:03 davecheney