Commit c41c7a09 authored by Gabriel Charette's avatar Gabriel Charette Committed by Commit Bot

Revert "Use all available workers for concurrent marking."

This reverts commit 3c62f7ae.
(and commit 4939463c)

The goal of this revert is to contrast the effect on perf bots of
landing it vs reverting it to more easily attribute its impact.

R=hpayer@chromium.org

Bug: chromium:812178
Change-Id: I7c977b1b0b587f787263272400d87f6aae7af634
Reviewed-on: https://chromium-review.googlesource.com/936761
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51546}
parent 04c90edb
......@@ -506,10 +506,14 @@ void ConcurrentMarking::ScheduleTasks() {
base::LockGuard<base::Mutex> guard(&pending_lock_);
DCHECK_EQ(0, pending_task_count_);
if (task_count_ == 0) {
task_count_ = Max(
1, Min(kMaxTasks,
static_cast<int>(V8::GetCurrentPlatform()
->NumberOfAvailableBackgroundThreads())));
// TODO(ulan): Increase the number of tasks for platforms that benefit
// from it.
task_count_ =
(static_cast<int>(
V8::GetCurrentPlatform()->NumberOfAvailableBackgroundThreads()) +
1) /
2;
task_count_ = Max(Min(task_count_, kMaxTasks), 1);
}
// Task id 0 is for the main thread.
for (int i = 1; i <= task_count_; i++) {
......
......@@ -53,10 +53,7 @@ class ConcurrentMarking {
COMPLETE_TASKS_FOR_TESTING,
};
// TODO(gab): The only thing that prevents this being above 7 is
// Worklist::kMaxNumTasks being maxed at 8 (concurrent marking doesn't use
// task 0, reserved for the main thread).
static constexpr int kMaxTasks = 7;
static constexpr int kMaxTasks = 4;
using MarkingWorklist = Worklist<HeapObject*, 64 /* segment size */>;
ConcurrentMarking(Heap* heap, MarkingWorklist* shared,
......
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