Commit afaa907f authored by Michael Lippautz's avatar Michael Lippautz Committed by Commit Bot

Revert "heap: Remove OSX restriction for maximum parallelism"

This reverts commit ad65e584.

Reason for revert: Regresses because of the same reasons for older OSX versions, see https://chromeperf.appspot.com/report?sid=4f570d131a97fdc45bc479f6e526d9caaa388eefca08242ef66cbf3b7eb850e4&start_rev=741028&end_rev=742546

Original change's description:
> heap: Remove OSX restriction for maximum parallelism
> 
> Change-Id: I582af41a8b10957b8fc7acb388871b1d51783a8c
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2062395
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#66317}

TBR=ulan@chromium.org,mlippautz@chromium.org

Change-Id: I1812a39f2f70fd2b00d77b3cfd49edcd4e967d6d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2064212Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66334}
parent d5fccb8e
...@@ -515,8 +515,17 @@ void ConcurrentMarking::ScheduleTasks() { ...@@ -515,8 +515,17 @@ void ConcurrentMarking::ScheduleTasks() {
if (total_task_count_ == 0) { if (total_task_count_ == 0) {
static const int num_cores = static const int num_cores =
V8::GetCurrentPlatform()->NumberOfWorkerThreads() + 1; V8::GetCurrentPlatform()->NumberOfWorkerThreads() + 1;
// Leave one core for the main thread and other components, respectively. #if defined(V8_OS_MACOSX)
// Mac OSX 10.11 and prior seems to have trouble when doing concurrent
// marking on competing hyper-threads (regresses Octane/Splay). As such,
// only use num_cores/2, leaving one of those for the main thread.
// TODO(ulan): Use all cores on Mac 10.12+.
total_task_count_ = Max(1, Min(kMaxTasks, (num_cores / 2) - 1));
#else // defined(OS_MACOSX)
// On other platforms use all logical cores, leaving one for the main
// thread.
total_task_count_ = Max(1, Min(kMaxTasks, num_cores - 2)); total_task_count_ = Max(1, Min(kMaxTasks, num_cores - 2));
#endif // defined(OS_MACOSX)
DCHECK_LE(total_task_count_, kMaxTasks); DCHECK_LE(total_task_count_, kMaxTasks);
// One task is for the main thread. // One task is for the main thread.
STATIC_ASSERT(kMaxTasks + 1 <= MarkingWorklist::kMaxNumTasks); STATIC_ASSERT(kMaxTasks + 1 <= MarkingWorklist::kMaxNumTasks);
......
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