Chromium Code Reviews| Index: content/renderer/render_process_impl.cc |
| diff --git a/content/renderer/render_process_impl.cc b/content/renderer/render_process_impl.cc |
| index db042b903f1748a8b4ff9fbb4e92f0b3bb048555..abb54655863198d93a2eabcf1c80dbbb18bebae8 100644 |
| --- a/content/renderer/render_process_impl.cc |
| +++ b/content/renderer/render_process_impl.cc |
| @@ -93,7 +93,14 @@ GetDefaultSchedulerWorkerPoolParams() { |
| constexpr int kMaxNumThreadsInForegroundPoolUpperBound = 4; |
| constexpr double kMaxNumThreadsInForegroundPoolCoresMultiplier = 1; |
| constexpr int kMaxNumThreadsInForegroundPoolOffset = 0; |
| - constexpr size_t kMaxNumThreadsInForegroundFileIOPool = 1; |
| + |
| + // V8Platform::CallOnBackgroundThread() posts foreground blocking tasks. It |
| + // expects to have as many threads as cores available for these tasks. |
| + constexpr int kMaxNumThreadsInForegroundFileIOPoolLowerBound = 2; |
| + constexpr int kMaxNumThreadsInForegroundFileIOPoolUpperBound = 128; |
| + constexpr double kMaxNumThreadsInForegroundFileIOPoolCoresMultiplier = 1; |
| + constexpr int kMaxNumThreadsInForegroundFileIOPoolOffset = 0; |
| + |
| constexpr auto kSuggestedReclaimTime = base::TimeDelta::FromSeconds(30); |
| std::vector<base::SchedulerWorkerPoolParams> params_vector; |
| @@ -113,10 +120,15 @@ GetDefaultSchedulerWorkerPoolParams() { |
| kMaxNumThreadsInForegroundPoolCoresMultiplier, |
| kMaxNumThreadsInForegroundPoolOffset), |
| kSuggestedReclaimTime); |
| - params_vector.emplace_back("RendererForegroundFileIO", ThreadPriority::NORMAL, |
| - StandbyThreadPolicy::LAZY, |
| - kMaxNumThreadsInForegroundFileIOPool, |
| - kSuggestedReclaimTime); |
| + params_vector.emplace_back( |
| + "RendererForegroundFileIO", ThreadPriority::NORMAL, |
| + StandbyThreadPolicy::LAZY, |
| + base::RecommendedMaxNumberOfThreadsInPool( |
|
robliao
2017/02/06 20:07:51
Is using RecommendedMax... better than a std::min(
fdoray
2017/02/06 20:14:03
Done.
|
| + kMaxNumThreadsInForegroundFileIOPoolLowerBound, |
| + kMaxNumThreadsInForegroundFileIOPoolUpperBound, |
| + kMaxNumThreadsInForegroundFileIOPoolCoresMultiplier, |
| + kMaxNumThreadsInForegroundFileIOPoolOffset), |
| + kSuggestedReclaimTime); |
| DCHECK_EQ(WORKER_POOL_COUNT, params_vector.size()); |
| return params_vector; |
| } |