[wasm] Run tier-up with default priority

Avoid spawning low-priority tasks for tier-up, since low-priority tasks
map to the BEST_EFFORT priority in chrome, which will severly delay
execution of the tasks and not execute them even if background threads
are idle (see linked bug).

We should look into reverting this once the gin platform implementation
(or task scheduling) is adjusted to execute low-priority background
tasks more reliably.

R=ahaas@chromium.org

Bug: chromium:1094928
Change-Id: I9e84eeedc7b83bfd17edb1cd09a0084770b20eda
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2247645
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68362}
This commit is contained in:
Clemens Backes 2020-06-16 12:59:45 +02:00 committed by Commit Bot
parent aa320aaa5c
commit 662686541e

View File

@ -2928,16 +2928,13 @@ void CompilationStateImpl::RestartBackgroundTasks() {
}
}
if (baseline_compilation_finished() && recompilation_finished()) {
for (auto& task : new_tasks) {
V8::GetCurrentPlatform()->CallLowPriorityTaskOnWorkerThread(
std::move(task));
}
} else {
// Spawn all tasts with default priority (avoid
// {CallLowPriorityTaskOnWorkerThread}) even for tier up, because low priority
// tasks will be severely delayed even if background threads are idle (see
// https://crbug.com/1094928).
for (auto& task : new_tasks) {
V8::GetCurrentPlatform()->CallOnWorkerThread(std::move(task));
}
}
}
void CompilationStateImpl::SetError() {