Commit 66268654 authored by Clemens Backes's avatar Clemens Backes Committed by Commit Bot

[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/+/2247645Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68362}
parent aa320aaa
......@@ -2928,15 +2928,12 @@ void CompilationStateImpl::RestartBackgroundTasks() {
}
}
if (baseline_compilation_finished() && recompilation_finished()) {
for (auto& task : new_tasks) {
V8::GetCurrentPlatform()->CallLowPriorityTaskOnWorkerThread(
std::move(task));
}
} else {
for (auto& task : new_tasks) {
V8::GetCurrentPlatform()->CallOnWorkerThread(std::move(task));
}
// 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));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment