runtime: eagerly share GC work buffers
runtime: eagerly share GC work buffers

Currently, due to an oversight, we only balance work buffers
in background and idle workers and not in assists. As a
result, in assist-heavy workloads, assists are likely to tie
up large work buffers in per-P caches increasing the
likelihood that the global list will be empty. This increases
the likelihood that other GC workers will exit and assists
will block, slowing down the system as a whole. Fix this by
eagerly balancing work buffers as soon as the assists notice
that the global buffers are empty. This makes it much more
likely that work will be immediately available to other
workers and assists.

This change reduces the garbage benchmark time by 39% and
fixes the regresssion seen at CL 15893 golang.org/cl/15893.

Garbage benchmark times before and after this CL.
Before GOPERF-METRIC:time=4427020
After  GOPERF-METRIC:time=2721645

Fixes #13827

Change-Id: I9cb531fb873bab4b69ce9c1617e30df6c49cdcfe
Reviewed-on: https://go-review.googlesource.com/18341
Reviewed-by: Austin Clements <7ea35d812706d9213868749011af1ed4fa2f6aa0@google.com>

vanloswang/go,akutz/go,golang/go,codestation/go,CAFxX/go,cyberroadie/go,linux-on-ibm-z/go,derekmarcotte/go,codestation/go,binarycrusader/go,codestation/go,mwhudson/go,akutz/go,josharian/go,Endika/go,Samurais/go,vsekhar/elastic-go,Samurais/go,ImJasonH/go,cloudflare/go,CAFxX/go,golang/go,vsekhar/elastic-go,goodlang/good,Samurais/go,theif519/go,sndnvaps/go,Endika/go,linux-on-ibm-z/go,vanloswang/go,linux-on-ibm-z/go,Cofyc/go,linux-on-ibm-z/go,Cofyc/go,sndnvaps/go,golang/go,CAFxX/go,derekmarcotte/go,polyverse-security/go,polyverse-security/go,golang/go,golang/go,vanloswang/go,linux-on-ibm-z/go,miolini/go,binarycrusader/go,momchil-velikov/go,josharian/go,polyverse-security/go,derekmarcotte/go,ganboing/go-esx,momchil-velikov/go,4ad/go,codestation/go,polyverse-security/go,theif519/go,Endika/go,suncycheng/go,cloudflare/go,goodlang/good,sndnvaps/go,mwhudson/go,nawawi/go,Cofyc/go,akutz/go,codestation/go,cloudflare/go,CAFxX/go,derekmarcotte/go,mwhudson/go,binarycrusader/go,vanloswang/go,suncycheng/go,ImJasonH/go,linux-on-ibm-z/go,codestation/go,4ad/go,CAFxX/go,nawawi/go,nawawi/go,akutz/go,sndnvaps/go,binarycrusader/go,momchil-velikov/go,josharian/go,vanloswang/go,mwhudson/go,akutz/go,theif519/go,nawawi/go,cyberroadie/go,ganboing/go-esx,momchil-velikov/go,vanloswang/go,goodlang/good,miolini/go,sndnvaps/go,cyberroadie/go,ImJasonH/go,derekmarcotte/go,sndnvaps/go,derekmarcotte/go,mwhudson/go,nawawi/go,golang/go,suncycheng/go,4ad/go,goodlang/good,vsekhar/elastic-go,Cofyc/go,sndnvaps/go,Samurais/go,sndnvaps/go,binarycrusader/go,cloudflare/go,Samurais/go,ImJasonH/go,ImJasonH/go,goodlang/good,ganboing/go-esx,Cofyc/go,polyverse-security/go,theif519/go,miolini/go,4ad/go,derekmarcotte/go,polyverse-security/go,momchil-velikov/go,goodlang/good,polyverse-security/go,Samurais/go,theif519/go,Endika/go,theif519/go,momchil-velikov/go,mwhudson/go,Cofyc/go,vsekhar/elastic-go,4ad/go,vanloswang/go,ImJasonH/go,miolini/go,linux-on-ibm-z/go,vsekhar/elastic-go,christopher-henderson/Go,cyberroadie/go,ganboing/go-esx,miolini/go,ganboing/go-esx,mwhudson/go,cyberroadie/go,josharian/go,josharian/go,nawawi/go,binarycrusader/go,vsekhar/elastic-go,akutz/go,josharian/go,suncycheng/go,Samurais/go,mwhudson/go,Samurais/go,cloudflare/go,Endika/go,suncycheng/go,binarycrusader/go,golang/go,Cofyc/go,CAFxX/go,suncycheng/go,akutz/go,4ad/go,CAFxX/go,4ad/go,theif519/go,cloudflare/go,CAFxX/go,ImJasonH/go,goodlang/good,4ad/go,momchil-velikov/go,ganboing/go-esx,nawawi/go,codestation/go,suncycheng/go,codestation/go,golang/go,miolini/go,polyverse-security/go,cyberroadie/go,akutz/go,vanloswang/go,Endika/go,josharian/go,josharian/go,binarycrusader/go,ImJasonH/go,linux-on-ibm-z/go,vsekhar/elastic-go,nawawi/go,vsekhar/elastic-go,ganboing/go-esx,momchil-velikov/go,cyberroadie/go,cloudflare/go,cyberroadie/go,derekmarcotte/go,Endika/go,goodlang/good,theif519/go,suncycheng/go,Cofyc/go,miolini/go,cloudflare/go,Endika/go,ganboing/go-esx,miolini/go