• Andreas Haas's avatar
    [wasm] Run sync compilation with kUserBlocking priority · a7e8c320
    Andreas Haas authored
    With the recent switch from the tasks API to the jobs API for thread
    management within WebAssembly compilation we got the problem that
    TurboFan compilation of a previous compilation can block the Liftoff
    compilation of a new compilation. With synchronous compilation, this can
    cause significant delays for the user. With this CL we increase the
    priority of synchronous compilation so that at least synchronous
    compilation can only be blocked by other synchronous compilation. This
    fixes issues that we saw on autocad.
    
    Why is it okay to increase the priority of synchronous compilation?
    * On the main thread, synchronous compilation is only allowed for small
      modules which should not take long to compile. Also, the compilation
      blocks the main thread and should finish as fast as possible.
    * On worker threads, delaying other background work is not such a big
      issue.
    
    Downsides:
    * This does not only increase the priority of the initial compilation,
      but also for the TurboFan optimization. Similar to above, for small
      modules on the main thread this should not be a big deal because
      compilation is fast. Big modules can only be compiled on worker
      threads.
    
    Note that this is supposed to be a fix for the problems we see at the
    moment with autocad on stable and beta. Eventually compilation job
    management should be done by the wasm engine for all WebAssembly
    compilation, so that not each WebAssemly module has to do its own
    compilation job management.
    
    R=clemensb@chromium.org
    
    Bug: chromium:1142686, v8:11088
    Change-Id: Iee4948b2fcad944f587918e9452e6888258857f9
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2512911
    Commit-Queue: Andreas Haas <ahaas@chromium.org>
    Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#70923}
    a7e8c320
Name
Last commit
Last update
build_overrides Loading commit data...
custom_deps Loading commit data...
docs Loading commit data...
gni Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.clang-tidy Loading commit data...
.editorconfig Loading commit data...
.flake8 Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.vpython Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
COMMON_OWNERS Loading commit data...
DEPS Loading commit data...
DIR_METADATA Loading commit data...
ENG_REVIEW_OWNERS Loading commit data...
INFRA_OWNERS Loading commit data...
INTL_OWNERS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
MIPS_OWNERS Loading commit data...
OWNERS Loading commit data...
PPC_OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
S390_OWNERS Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...