Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1218)

Unified Diff: content/renderer/render_process_impl.cc

Issue 2681523002: Increase the number of TaskScheduler foreground threads in renderers. (Closed)
Patch Set: do not use RecommededMaxNumberOfThreadsInPool Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..d74a95f1df616f61db3294914bac58c08aaa279a 100644
--- a/content/renderer/render_process_impl.cc
+++ b/content/renderer/render_process_impl.cc
@@ -93,7 +93,6 @@ GetDefaultSchedulerWorkerPoolParams() {
constexpr int kMaxNumThreadsInForegroundPoolUpperBound = 4;
constexpr double kMaxNumThreadsInForegroundPoolCoresMultiplier = 1;
constexpr int kMaxNumThreadsInForegroundPoolOffset = 0;
- constexpr size_t kMaxNumThreadsInForegroundFileIOPool = 1;
constexpr auto kSuggestedReclaimTime = base::TimeDelta::FromSeconds(30);
std::vector<base::SchedulerWorkerPoolParams> params_vector;
@@ -113,9 +112,14 @@ GetDefaultSchedulerWorkerPoolParams() {
kMaxNumThreadsInForegroundPoolCoresMultiplier,
kMaxNumThreadsInForegroundPoolOffset),
kSuggestedReclaimTime);
+
+ // V8Platform::CallOnBackgroundThread() posts foreground blocking tasks. It
+ // expects to have as many threads as cores available for these tasks.
gab 2017/02/06 21:17:10 Such a comment is fine to justify CL (i.e. in desc
fdoray 2017/02/09 13:32:13 Done. The v8 tasks are only blocking in tests.
+ const int max_num_foreground_file_io_threads =
gab 2017/02/06 21:17:10 s/file_io/blocking/ now
fdoray 2017/02/09 13:32:14 Taken care of in a separate CL https://codereview.
+ std::max(2, base::SysInfo::NumberOfProcessors());
params_vector.emplace_back("RendererForegroundFileIO", ThreadPriority::NORMAL,
StandbyThreadPolicy::LAZY,
- kMaxNumThreadsInForegroundFileIOPool,
+ max_num_foreground_file_io_threads,
kSuggestedReclaimTime);
DCHECK_EQ(WORKER_POOL_COUNT, params_vector.size());
return params_vector;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698