runtime: use gList for gfree lists

Change-Id: I3d21587e02264fe5da1cc38d98779facfa09b927
Reviewed-on: https://go-review.googlesource.com/129398
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rick Hudson <rlh@golang.org>
This commit is contained in:
Austin Clements 2018-08-10 10:19:03 -04:00
parent de990545c3
commit 8e8cc9db0f
3 changed files with 77 additions and 81 deletions

View file

@ -506,8 +506,10 @@ type p struct {
runnext guintptr
// Available G's (status == Gdead)
gfree *g
gfreecnt int32
gFree struct {
gList
n int32
}
sudogcache []*sudog
sudogbuf [128]*sudog
@ -578,10 +580,12 @@ type schedt struct {
runqsize int32
// Global cache of dead G's.
gflock mutex
gfreeStack *g
gfreeNoStack *g
ngfree int32
gFree struct {
lock mutex
stack gList // Gs with stacks
noStack gList // Gs without stacks
n int32
}
// Central cache of sudog structs.
sudoglock mutex