runtime: tune P retake logic When GOMAXPROCS>1 the last P in syscall is never retaken (because there are already idle P's -- npidle>0). This prevents sysmon thread from sleeping. On a darwin machine the program from issue 6673 constantly consumes ~0.2% CPU. With this change it stably consumes 0.0% CPU. Fixes issue 6673.
runtime: tune P retake logic
When GOMAXPROCS>1 the last P in syscall is never retaken
(because there are already idle P's -- npidle>0).
This prevents sysmon thread from sleeping.
On a darwin machine the program from issue 6673 constantly
consumes ~0.2% CPU. With this change it stably consumes 0.0% CPU.
Fixes issue 6673.

R=golang-codereviews, r
CC=bradfitz, golang-codereviews, iant, khr
https://codereview.appspot.com/56990045

firebitsbr/golang-old,wesolows/golang-old,firebitsbr/golang-old,wesolows/golang-old,wesolows/golang,wesolows/golang,wesolows/golang,wesolows/golang-old,wesolows/golang,firebitsbr/golang-old,firebitsbr/golang-old,firebitsbr/golang-old,firebitsbr/golang-old,wesolows/golang-old,wesolows/golang,firebitsbr/golang-old,wesolows/golang-old,wesolows/golang-old,firebitsbr/golang-old,wesolows/golang,wesolows/golang,wesolows/golang-old