Commit 2ba05d67 authored by Gabriel Charette's avatar Gabriel Charette Committed by Commit Bot

Revert "Revert "Use all available workers for concurrent marking.""

This reverts commit c41c7a09.

Reason for revert: relanding now that the perf waterfall has had a stab at this revert.

Original change's description:
> 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: Hannes Payer <hpayer@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#51546}

TBR=gab@chromium.org,hpayer@chromium.org

Change-Id: I1ecfc70867dc5424cba1a9ecd229ae031c3e9aa4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:812178
Reviewed-on: https://chromium-review.googlesource.com/937725Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51577}
parent 800daded
......@@ -506,14 +506,10 @@ void ConcurrentMarking::ScheduleTasks() {
base::LockGuard<base::Mutex> guard(&pending_lock_);
DCHECK_EQ(0, pending_task_count_);
if (task_count_ == 0) {
// 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_count_ = Max(
1, Min(kMaxTasks,
static_cast<int>(V8::GetCurrentPlatform()
->NumberOfAvailableBackgroundThreads())));
}
// Task id 0 is for the main thread.
for (int i = 1; i <= task_count_; i++) {
......
......@@ -53,7 +53,10 @@ class ConcurrentMarking {
COMPLETE_TASKS_FOR_TESTING,
};
static constexpr int kMaxTasks = 4;
// 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;
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