• Clemens Backes's avatar
    [platform] Use more tasks for jobs · 044ddd31
    Clemens Backes authored
    Wasm recently switched from spawning a number of background tasks for
    compilation to just using a single job (via the pretty new
    {Platform::PostJob} API). This caused major regressions in several
    benchmarks running in d8, because the {DefaultPlatform} is only using
    half of the available worker threads for executing jobs with "user
    visible" priority.
    
    This CL changes this to use all available worker threads for "user
    blocking" or "user visible" jobs, and two threads for "best effort"
    jobs. The limit of two threads for best effort is identical to what
    chromium does with best effort *tasks*. For user blocking and user
    visible, chromium does not impose any limit, so we also remove the
    limitation to half of the threads from d8.
    
    Drive-by: Use {NewDefaultJobHandle} for constructing {DefaultJobHandle}.
    
    R=mlippautz@chromium.org
    CC=ahaas@chromium.org, gab@chromium.org, etiennep@chromium.org
    
    Bug: chromium:1113234, chromium:1101340
    Change-Id: I9280e649a1cf3832c562ff7251e8bda0103af111
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2339481Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
    Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
    Commit-Queue: Hannes Payer <hpayer@chromium.org>
    Auto-Submit: Clemens Backes <clemensb@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#69265}
    044ddd31
default-platform.cc 8.96 KB