8l, runtime: place G and M pointers relative to _tos on Plan 9, instead of hardcoded values for USTKTOP.
This should allow executing both on native Plan 9 and inside 9vx.
I apologize for not getting to these code reviews earlier. Please take a look and ...
14 years, 3 months ago
(2011-02-01 20:55:41 UTC)
#3
I apologize for not getting to these code reviews earlier.
Please take a look and see whether you can find a way
to incorporate the most recent garbage collector changes
in some reasonable way. I am honestly not sure how
to implement the interface on Plan 9. It is possible that
the answer is to use sbrk in SysReserve and then make
SysMap a no-op, depending on demand paging to avoid
charging the process for the memory until it actually
touches those pages. But I don't remember enough to
know whether that will actually work.
Russ
Hi! I've modified mem.c to round addresses to page boundaries, otherwise using the old 8 ...
14 years, 3 months ago
(2011-02-02 13:05:54 UTC)
#4
Hi!
I've modified mem.c to round addresses to page boundaries, otherwise using the
old 8 byte rounding, mlookup() fails to find the address.
I added SysMap() a no-op as you suggested, and SysReserve() as a wrapper to
SysAlloc() although I didn't see where they are called for non-64bit platforms.
Pavel
> I've modified mem.c to round addresses to page boundaries, otherwise > using the old ...
14 years, 3 months ago
(2011-02-02 20:32:46 UTC)
#5
> I've modified mem.c to round addresses to page boundaries, otherwise
> using the old 8 byte rounding, mlookup() fails to find the address.
>
> I added SysMap() a no-op as you suggested, and SysReserve() as a wrapper
> to SysAlloc() although I didn't see where they are called for non-64bit
> platforms.
That's the next CL to be checked in (3975046).
Russ
> That's the next CL to be checked in (3975046). I've applied it manually (I ...
14 years, 3 months ago
(2011-02-02 21:43:56 UTC)
#6
> That's the next CL to be checked in (3975046).
I've applied it manually (I can't get hg clpatch to import due to
runtime/windows/mem.c). I can get away with running a hello.go which uses
println, but a modified sieve running with runtime.GOMAXPROCS(4) set is dying in
mgc0.c:228:
s = runtime·mheap.map[((uintptr)b>>PageShift) - k0];
the 386 Linux version is not doing to great either:
panic: invalid memory address or nil pointer dereference
throw: panic during gc
[signal 0xb code=0x1 addr=0x1c pc=0x804ce2e]
runtime.throw+0x3e
/home/yuval/Data/devel/custom-build/golang.heap/src/pkg/runtime/runtime.c:78
runtime.throw(0x806e828, 0x806e69f)
runtime.panicstring+0x51
/home/yuval/Data/devel/custom-build/golang.heap/src/pkg/runtime/runtime.c:89
runtime.panicstring(0x806e69f, 0x100000)
runtime.sigpanic+0x11b
/home/yuval/Data/devel/custom-build/golang.heap/src/pkg/runtime/linux/thread.c:291
runtime.sigpanic()
scanblock+0x298
/home/yuval/Data/devel/custom-build/golang.heap/src/pkg/runtime/mgc0.c:228
scanblock(0x806e000, 0x246a, 0x0)
mark+0x3d
/home/yuval/Data/devel/custom-build/golang.heap/src/pkg/runtime/mgc0.c:325
mark()
runtime.gc+0x1db
/home/yuval/Data/devel/custom-build/golang.heap/src/pkg/runtime/mgc0.c:527
runtime.gc(0x0, 0x40)
runtime.mallocgc+0x1d9
/home/yuval/Data/devel/custom-build/golang.heap/src/pkg/runtime/malloc.c:89
runtime.mallocgc(0x40, 0x0, 0x1, 0x1, 0x0, ...)
runtime.mal+0x43
/home/yuval/Data/devel/custom-build/golang.heap/src/pkg/runtime/malloc.c:282
runtime.mal(0x38, 0x0)
runtime.makechan_c+0x86
/home/yuval/Data/devel/custom-build/golang.heap/src/pkg/runtime/chan.c:103
runtime.makechan_c(0x8057e7c, 0x0, 0x0)
runtime.makechan+0x39
/home/yuval/Data/devel/custom-build/golang.heap/src/pkg/runtime/chan.c:148
runtime.makechan(0x8057e7c, 0x0, 0x0, 0x8051765, 0x806f984, ...)
main.Sieve+0x36 /home/yuval/Data/devel/go-test/sieve.go:31
main.Sieve()
main.main+0x2b /home/yuval/Data/devel/go-test/sieve.go:44
main.main()
runtime.mainstart+0xf
/home/yuval/Data/devel/custom-build/golang.heap/src/pkg/runtime/386/asm.s:85
runtime.mainstart()
runtime.goexit
/home/yuval/Data/devel/custom-build/golang.heap/src/pkg/runtime/proc.c:149
runtime.goexit()
probably not related but cgo fails on jasonrpc.
Pavel
On 2011/02/02 21:43:56, paulzhol wrote: > > That's the next CL to be checked in ...
14 years, 3 months ago
(2011-02-03 04:03:41 UTC)
#7
On 2011/02/02 21:43:56, paulzhol wrote:
> > That's the next CL to be checked in (3975046).
>
> I've applied it manually (I can't get hg clpatch to import due to
> runtime/windows/mem.c). I can get away with running a hello.go which uses
> println, but a modified sieve running with runtime.GOMAXPROCS(4) set is dying
in
> mgc0.c:228:
> s = runtime·mheap.map[((uintptr)b>>PageShift) - k0];
Fixed in the submitted CL.
Let's get native Plan 9 working. I never cease to be amazed that 9vx works ...
14 years, 3 months ago
(2011-02-03 19:33:42 UTC)
#9
Let's get native Plan 9 working.
I never cease to be amazed that 9vx works as
well as it does, but broken on 9vx still has a
good chance of being 9vx's fault.
Russ
On 2011/02/03 19:33:42, rsc wrote: > Let's get native Plan 9 working. > > I ...
14 years, 3 months ago
(2011-02-03 19:46:38 UTC)
#10
On 2011/02/03 19:33:42, rsc wrote:
> Let's get native Plan 9 working.
>
> I never cease to be amazed that 9vx works as
> well as it does, but broken on 9vx still has a
> good chance of being 9vx's fault.
I'm using Ron Minnich' 9vx branch with fixes for seqmacquire/release. I'll ask
his help with this.
As a side note, what are the chances of http://codereview.appspot.com/3816043/
getting merged in ? Should I split it into 2 CL's ? is the os change too big,
maybe I could maintain it as a collection of ed scripts outside of the tree.
Pavel
> As a side note, what are the chances of > http://codereview.appspot.com/3816043/ getting merged in ...
14 years, 3 months ago
(2011-02-03 19:59:40 UTC)
#12
> As a side note, what are the chances of
> http://codereview.appspot.com/3816043/ getting merged in ? Should I
> split it into 2 CL's ? is the os change too big, maybe I could maintain
> it as a collection of ed scripts outside of the tree.
We're getting there. If you can split the syscall stuff
into a different CL that would certainly speed it up
a little.
I want to wait until the new os.Process API is checked
in before we check in the Plan 9 changes to os, though.
Russ
Recent allocator changes make v a hint for SysReserve, which in turn can just call ...
14 years, 3 months ago
(2011-02-10 21:32:36 UTC)
#15
Recent allocator changes make v a hint for SysReserve, which in turn can just
call SysAlloc.
Hello and sieve both run on native Plan 9, still failing in runtime/mcache.c:21
on 9vx.
Pavel
*** Submitted as 1d10645da15a *** 8l, runtime: place G and M pointers relative to _tos ...
14 years, 3 months ago
(2011-02-11 18:39:07 UTC)
#17
*** Submitted as 1d10645da15a ***
8l, runtime: place G and M pointers relative to _tos on Plan 9, instead of
hardcoded values for USTKTOP.
This should allow executing both on native Plan 9 and inside 9vx.
R=rsc
CC=golang-dev
http://codereview.appspot.com/3993044
Committer: Russ Cox <rsc@golang.org>
Issue 3993044: code review 3993044: 8l, runtime: place G and M pointers relative to _tos on...
(Closed)
Created 14 years, 4 months ago by paulzhol
Modified 14 years, 3 months ago
Reviewers:
Base URL:
Comments: 6