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

webfd/go-zh,sanjosh/sanjos100-tipc,sanjosh/sanjos100-tipc,bryanxu/go-zh,webfd/go-zh,bryanxu/go-zh,rdp/rogerpack2005-golang,bryanxu/go-zh,sanjosh/sanjos100-tipc,d0f/go-zh,d0f/go-zh,webfd/go-zh,d0f/go-zh,bryanxu/go-zh,rdp/rogerpack2005-golang,sanjosh/sanjos100-tipc,sanjosh/sanjos100-tipc,rdp/rogerpack2005-golang,webfd/go-zh,webfd/go-zh,glycerine/jeaten-go-arrayof-structof,rdp/rogerpack2005-golang,webfd/go-zh,glycerine/jeaten-go-arrayof-structof,glycerine/jeaten-go-arrayof-structof,sanjosh/sanjos100-tipc,webfd/go-zh,sanjosh/sanjos100-tipc,glycerine/jeaten-go-arrayof-structof,d0f/go-zh,bryanxu/go-zh,glycerine/jeaten-go-arrayof-structof,rdp/rogerpack2005-golang,bryanxu/go-zh,rdp/rogerpack2005-golang,glycerine/jeaten-go-arrayof-structof,glycerine/jeaten-go-arrayof-structof,sanjosh/sanjos100-tipc,webfd/go-zh,d0f/go-zh,d0f/go-zh,bryanxu/go-zh,rdp/rogerpack2005-golang,rdp/rogerpack2005-golang,bryanxu/go-zh,d0f/go-zh,d0f/go-zh,glycerine/jeaten-go-arrayof-structof