Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/go: use critical path scheduling
This is a port of part of CL 13235046, by dvyukov. Use the critical path method to schedule work. On my laptop (8 logical cores), this CL reduces the wall time for some but not all large commands: go build -a std old=19.0s new=13.2s delta=-30.7% n=50 p=2e-119 go test -short std old=65.3s new=54.4s delta=-16.8% n=25 p=1e-45 all.bash old=318.4s new=317.9s delta=-0.16% n=10 p=0.73 This initial implementation assigns equal weight to all actions. This is a significant oversimplification. Making actions more granular and assigning more accurate weights is future work. However, this should be enough to improve the CPU utilization of the compile-all builder. Note that this causes noticeable stalls in output when building or testing many packages, since the scheduling usually does not correspond to the planned output order. This should improve as scheduling improves. Updates golang#8893. Change-Id: I8fba875a9a56aed132bd6b37b607e374f336728d
- Loading branch information