[Jobs API]: Back pressure on many workers.
queue_time for Jobs is adjusted based on number of workers to put back pressure on Jobs that use many workers. This prioritizes newer work that uses less workers (or simple sequences). To achieve this, GetSortKey is extracted from Transaction and uses atomic load. This is safe since the result of GetSortKey and the queue itself is only modified under lock. Follow-up: consider integrating full TaskSourceSortKey in ShouldYield Change-Id: If26e00b40502b0a4e09f10e3627de8b7e4a52488 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2377893 Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org> Reviewed-by:Gabriel Charette <gab@chromium.org> Cr-Commit-Position: refs/heads/master@{#807090}
Showing
Please register or sign in to comment