|
|
DescriptionInitialize TaskScheduler in renderers.
This CL initializes TaskScheduler in renderers using
default arguments. ContentRenderClient may provide
different arguments.
Initially, no threads will be created by TaskScheduler
in renderers because no tasks are posted to it and
pools are initialized with StandbyThreadPolicy::LAZY.
In a separate, we will start running v8 tasks in
TaskScheduler rather than WorkerPool
(https://cs.chromium.org/chromium/src/gin/v8_platform.cc?sq=package:chromium&l=70&dr=C).
BUG=664996
Committed: https://crrev.com/d2233a758df698c669341ef2e49b1ad2b23ce8da
Cr-Commit-Position: refs/heads/master@{#438202}
Patch Set 1 #Patch Set 2 : fix test error #Patch Set 3 : single process #Patch Set 4 : do not enable in this CL #
Total comments: 5
Patch Set 5 : refactor #Patch Set 6 : self-review #
Total comments: 13
Patch Set 7 : CR gab robliao #18-24 #Patch Set 8 : fix build error #Patch Set 9 : rebase #Patch Set 10 : rebase #Patch Set 11 : provide a vector #Patch Set 12 : fix comment #Patch Set 13 : add dcheck #
Total comments: 5
Patch Set 14 : refactor #Patch Set 15 : refactor #Patch Set 16 : self-review #
Total comments: 1
Patch Set 17 : fix number of threads per pool #Patch Set 18 : self-review #
Total comments: 2
Patch Set 19 : CR gab #68 #
Total comments: 4
Patch Set 20 : CR jam #76 #
Messages
Total messages: 85 (56 generated)
The CQ bit was checked by fdoray@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linu...)
The CQ bit was checked by fdoray@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by fdoray@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Description was changed from ========== Enable TaskScheduler in renderers. BUG= ========== to ========== Add TaskScheduler initialization code in RenderProcessImpl. This CL adds a ShouldInitializeTaskScheduler() method to ContentRendererClient. When this method returns true and Chrome doesn't run in single-process mode, RenderProcessImpl initializes a TaskScheduler using provided arguments in its constructor and shuts it down in its destructor. BUG=664996 ==========
fdoray@chromium.org changed reviewers: + gab@chromium.org, robliao@chromium.org
PTAL Tests pass when ContentRendererClient::ShouldInitializeTaskScheduler() returns true (see patch set 3). I also verified that field trials (not variation params) are set in Chrome renderers before this method is called.
https://codereview.chromium.org/2491823005/diff/60001/content/renderer/render... File content/renderer/render_process_impl.cc (right): https://codereview.chromium.org/2491823005/diff/60001/content/renderer/render... content/renderer/render_process_impl.cc:64: bool MaybeInitializeTaskScheduler() { What's the behavior when base linked to chrome.dll and chrome_child.dll? How do we access chrome.dll's task scheduler?
https://codereview.chromium.org/2491823005/diff/60001/content/renderer/render... File content/renderer/render_process_impl.cc (right): https://codereview.chromium.org/2491823005/diff/60001/content/renderer/render... content/renderer/render_process_impl.cc:64: bool MaybeInitializeTaskScheduler() { On 2016/11/14 16:05:26, robliao wrote: > What's the behavior when base linked to chrome.dll and chrome_child.dll? > How do we access chrome.dll's task scheduler? Hmm? base is linked to both but any process instance is only running one or the other? Is there a case of running both chrome.dll and chrome_child.dll in the same process? single-process mode I guess? Then maybe the code below is incorrect for single-process mode? https://codereview.chromium.org/2491823005/diff/60001/content/renderer/render... content/renderer/render_process_impl.cc:67: if (base::CommandLine::ForCurrentProcess()->HasSwitch( Use base::TaskScheduler::GetInstance() instead? (potentially covers other cases we're not aware of?) Although we probably want to know if there are more cases so maybe: if (...GetInstance()) { // TaskScheduler is not expected to already exist unless in single process mode. DCHECK(..single process..); return false; } Note: this also allows TaskScheduler to be live in renderers and not in browser if we ever care.
Description was changed from ========== Add TaskScheduler initialization code in RenderProcessImpl. This CL adds a ShouldInitializeTaskScheduler() method to ContentRendererClient. When this method returns true and Chrome doesn't run in single-process mode, RenderProcessImpl initializes a TaskScheduler using provided arguments in its constructor and shuts it down in its destructor. BUG=664996 ========== to ========== Initialize TaskScheduler in renderers. This CL initializes TaskScheduler in renderers using arguments provided by the ContentRendererClient. By default, no tasks are redirected to TaskScheduler. BUG=664996 ==========
PTAnL With this CL, TaskScheduler is always initialized in renderers. Before it lands, we will also need to initialize TaskScheduler by default in the browser process. https://codereview.chromium.org/2491823005/diff/60001/content/renderer/render... File content/renderer/render_process_impl.cc (right): https://codereview.chromium.org/2491823005/diff/60001/content/renderer/render... content/renderer/render_process_impl.cc:64: bool MaybeInitializeTaskScheduler() { On 2016/11/14 16:16:43, gab wrote: > On 2016/11/14 16:05:26, robliao wrote: > > What's the behavior when base linked to chrome.dll and chrome_child.dll? > > How do we access chrome.dll's task scheduler? > > Hmm? base is linked to both but any process instance is only running one or the > other? Is there a case of running both chrome.dll and chrome_child.dll in the > same process? single-process mode I guess? Then maybe the code below is > incorrect for single-process mode? --single-process only works in component builds https://cs.chromium.org/chromium/src/content/app/content_main_runner.cc?sq=pa... , so it is not possible to have a process that loads chrome.dll and chrome_child.dll. https://codereview.chromium.org/2491823005/diff/60001/content/renderer/render... content/renderer/render_process_impl.cc:67: if (base::CommandLine::ForCurrentProcess()->HasSwitch( On 2016/11/14 16:16:43, gab wrote: > Use base::TaskScheduler::GetInstance() instead? (potentially covers other cases > we're not aware of?) > > Although we probably want to know if there are more cases so maybe: > > if (...GetInstance()) { > // TaskScheduler is not expected to already exist unless in single process > mode. > DCHECK(..single process..); > return false; > } > > Note: this also allows TaskScheduler to be live in renderers and not in browser > if we ever care. Done. With some changes because I don't want a RenderProcessImpl to initialize a TaskScheduler and enable SequencedWorkerPool redirection in the browser process (otherwise, the browser process starts without a TaskScheduler and gets one when it launches a renderer...).
lgtm % nits (should we add the experiment hooks in ChromeContentRendererClient in this CL as well? I think so. If you prefer to split, link to the follow-up CL in this one to justify it?) https://codereview.chromium.org/2491823005/diff/100001/content/public/rendere... File content/public/renderer/content_renderer_client.h (right): https://codereview.chromium.org/2491823005/diff/100001/content/public/rendere... content/public/renderer/content_renderer_client.h:145: // repectively. |redirect_sequenced_worker_pool| indicates whether tasks respectively https://codereview.chromium.org/2491823005/diff/100001/content/renderer/rende... File content/renderer/render_process_impl.cc (right): https://codereview.chromium.org/2491823005/diff/100001/content/renderer/rende... content/renderer/render_process_impl.cc:74: return traits.priority() == base::TaskPriority::BACKGROUND DCHECK(!traits.with_file_io());
https://codereview.chromium.org/2491823005/diff/100001/content/public/rendere... File content/public/renderer/content_renderer_client.h (right): https://codereview.chromium.org/2491823005/diff/100001/content/public/rendere... content/public/renderer/content_renderer_client.h:142: // background pool and foreground pool, repectively. |background_reclaim_time| s/repectively/respectively/ and below. https://codereview.chromium.org/2491823005/diff/100001/content/renderer/rende... File content/renderer/render_process_impl.cc (right): https://codereview.chromium.org/2491823005/diff/100001/content/renderer/rende... content/renderer/render_process_impl.cc:101: DCHECK_GT(max_background_threads, 0); Hitting this DCHECK and the one below seems like it would be pretty bad as no workers would be allocated to create tasks. Maybe we should CHECK instead?
https://codereview.chromium.org/2491823005/diff/100001/content/renderer/rende... File content/renderer/render_process_impl.cc (right): https://codereview.chromium.org/2491823005/diff/100001/content/renderer/rende... content/renderer/render_process_impl.cc:101: DCHECK_GT(max_background_threads, 0); On 2016/11/15 20:31:51, robliao wrote: > Hitting this DCHECK and the one below seems like it would be pretty bad as no > workers would be allocated to create tasks. Maybe we should CHECK instead? create tasks -> run tasks
https://codereview.chromium.org/2491823005/diff/100001/content/renderer/rende... File content/renderer/render_process_impl.cc (right): https://codereview.chromium.org/2491823005/diff/100001/content/renderer/rende... content/renderer/render_process_impl.cc:101: DCHECK_GT(max_background_threads, 0); On 2016/11/15 20:32:36, robliao wrote: > On 2016/11/15 20:31:51, robliao wrote: > > Hitting this DCHECK and the one below seems like it would be pretty bad as no > > workers would be allocated to create tasks. Maybe we should CHECK instead? > > create tasks -> run tasks No need to CHECK IMO, DCHECK documents runtime invariants. CHECK is meant to verify bad input that could cause security issues. https://chromium.googlesource.com/chromium/src/+/master/styleguide/c++/c++.md...
https://codereview.chromium.org/2491823005/diff/100001/content/renderer/rende... File content/renderer/render_process_impl.cc (right): https://codereview.chromium.org/2491823005/diff/100001/content/renderer/rende... content/renderer/render_process_impl.cc:101: DCHECK_GT(max_background_threads, 0); On 2016/11/15 20:42:47, gab wrote: > On 2016/11/15 20:32:36, robliao wrote: > > On 2016/11/15 20:31:51, robliao wrote: > > > Hitting this DCHECK and the one below seems like it would be pretty bad as > no > > > workers would be allocated to create tasks. Maybe we should CHECK instead? > > > > create tasks -> run tasks > > No need to CHECK IMO, DCHECK documents runtime invariants. CHECK is meant to > verify bad input that could cause security issues. > > https://chromium.googlesource.com/chromium/src/+/master/styleguide/c++/c++.md... This would be pretty fatal to the process. We already CHECK that SchedulerWorkerPoolImpl::Initialize provides at least one worker thread because we won't make progress otherwise. Bringing that CHECK here would cover the input case (and we wouldn't have to disambiguate between the OOM case and bad inputs).
https://codereview.chromium.org/2491823005/diff/100001/content/renderer/rende... File content/renderer/render_process_impl.cc (right): https://codereview.chromium.org/2491823005/diff/100001/content/renderer/rende... content/renderer/render_process_impl.cc:101: DCHECK_GT(max_background_threads, 0); On 2016/11/15 20:49:08, robliao wrote: > On 2016/11/15 20:42:47, gab wrote: > > On 2016/11/15 20:32:36, robliao wrote: > > > On 2016/11/15 20:31:51, robliao wrote: > > > > Hitting this DCHECK and the one below seems like it would be pretty bad as > > no > > > > workers would be allocated to create tasks. Maybe we should CHECK > instead? > > > > > > create tasks -> run tasks > > > > No need to CHECK IMO, DCHECK documents runtime invariants. CHECK is meant to > > verify bad input that could cause security issues. > > > > > https://chromium.googlesource.com/chromium/src/+/master/styleguide/c++/c++.md... > > This would be pretty fatal to the process. We already CHECK that > SchedulerWorkerPoolImpl::Initialize provides at least one worker thread because > we won't make progress otherwise. Bringing that CHECK here would cover the input > case (and we wouldn't have to disambiguate between the OOM case and bad inputs). But the CHECK in SchedulerWorkerPoolImpl::Initialize is different IMO (i.e. it's CHECKing versus the result of invoking OS APIs to create threads which we can't do without) A CHECK here is merely verifying input we own (albeit sometimes from server but don't think we should bother with that).
All done. Working on the ChromeContentRendererClient CL and will add a link from this CL once it's ready. https://codereview.chromium.org/2491823005/diff/100001/content/public/rendere... File content/public/renderer/content_renderer_client.h (right): https://codereview.chromium.org/2491823005/diff/100001/content/public/rendere... content/public/renderer/content_renderer_client.h:142: // background pool and foreground pool, repectively. |background_reclaim_time| On 2016/11/15 20:31:51, robliao wrote: > s/repectively/respectively/ and below. Done. https://codereview.chromium.org/2491823005/diff/100001/content/public/rendere... content/public/renderer/content_renderer_client.h:145: // repectively. |redirect_sequenced_worker_pool| indicates whether tasks On 2016/11/15 20:25:05, gab wrote: > respectively Done. https://codereview.chromium.org/2491823005/diff/100001/content/renderer/rende... File content/renderer/render_process_impl.cc (right): https://codereview.chromium.org/2491823005/diff/100001/content/renderer/rende... content/renderer/render_process_impl.cc:74: return traits.priority() == base::TaskPriority::BACKGROUND On 2016/11/15 20:25:05, gab wrote: > DCHECK(!traits.with_file_io()); Done. https://codereview.chromium.org/2491823005/diff/100001/content/renderer/rende... content/renderer/render_process_impl.cc:101: DCHECK_GT(max_background_threads, 0); On 2016/11/15 20:49:08, robliao wrote: > On 2016/11/15 20:42:47, gab wrote: > > On 2016/11/15 20:32:36, robliao wrote: > > > On 2016/11/15 20:31:51, robliao wrote: > > > > Hitting this DCHECK and the one below seems like it would be pretty bad as > > no > > > > workers would be allocated to create tasks. Maybe we should CHECK > instead? > > > > > > create tasks -> run tasks > > > > No need to CHECK IMO, DCHECK documents runtime invariants. CHECK is meant to > > verify bad input that could cause security issues. > > > > > https://chromium.googlesource.com/chromium/src/+/master/styleguide/c++/c++.md... > > This would be pretty fatal to the process. We already CHECK that > SchedulerWorkerPoolImpl::Initialize provides at least one worker thread because > we won't make progress otherwise. Bringing that CHECK here would cover the input > case (and we wouldn't have to disambiguate between the OOM case and bad inputs). These DCHECKs will only fail if GetTaskSchedulerInitializationArguments() isn't properly implemented. Such a problem is easy to catch on developer machines and there is little value to having CHECKs for it in production code. The CHECKs in TaskSchedulerImpl::Initialize() may fail even if there is no error in our code (e.g. CreateThread fails). For our users, a process that is terminated is better than having a process that can't run tasks. Since the style guide says that we may only use CHECK to prevent security vulnerabilities or to temporarily to catch errors in the wild, we might have to find an alternative way to exit the process when there are errors in TaskSchedulerImpl::Initialize().
The CQ bit was checked by fdoray@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linu...)
https://codereview.chromium.org/2491823005/diff/100001/content/renderer/rende... File content/renderer/render_process_impl.cc (right): https://codereview.chromium.org/2491823005/diff/100001/content/renderer/rende... content/renderer/render_process_impl.cc:101: DCHECK_GT(max_background_threads, 0); On 2016/11/16 16:40:52, fdoray wrote: > On 2016/11/15 20:49:08, robliao wrote: > > On 2016/11/15 20:42:47, gab wrote: > > > On 2016/11/15 20:32:36, robliao wrote: > > > > On 2016/11/15 20:31:51, robliao wrote: > > > > > Hitting this DCHECK and the one below seems like it would be pretty bad > as > > > no > > > > > workers would be allocated to create tasks. Maybe we should CHECK > > instead? > > > > > > > > create tasks -> run tasks > > > > > > No need to CHECK IMO, DCHECK documents runtime invariants. CHECK is meant to > > > verify bad input that could cause security issues. > > > > > > > > > https://chromium.googlesource.com/chromium/src/+/master/styleguide/c++/c++.md... > > > > This would be pretty fatal to the process. We already CHECK that > > SchedulerWorkerPoolImpl::Initialize provides at least one worker thread > because > > we won't make progress otherwise. Bringing that CHECK here would cover the > input > > case (and we wouldn't have to disambiguate between the OOM case and bad > inputs). > > These DCHECKs will only fail if GetTaskSchedulerInitializationArguments() isn't > properly implemented. Such a problem is easy to catch on developer machines and > there is little value to having CHECKs for it in production code. Agreed. > > The CHECKs in TaskSchedulerImpl::Initialize() may fail even if there is no error > in our code (e.g. CreateThread fails). For our users, a process that is > terminated is better than having a process that can't run tasks. > > Since the style guide says that we may only use CHECK to prevent security > vulnerabilities or to temporarily to catch errors in the wild, we might have to > find an alternative way to exit the process when there are errors in > TaskSchedulerImpl::Initialize(). Meh, I'm fine with the current use of CHECK for hard exit on system failure to create threads.
On 2016/11/16 16:58:06, gab wrote: > https://codereview.chromium.org/2491823005/diff/100001/content/renderer/rende... > File content/renderer/render_process_impl.cc (right): > > https://codereview.chromium.org/2491823005/diff/100001/content/renderer/rende... > content/renderer/render_process_impl.cc:101: DCHECK_GT(max_background_threads, > 0); > On 2016/11/16 16:40:52, fdoray wrote: > > On 2016/11/15 20:49:08, robliao wrote: > > > On 2016/11/15 20:42:47, gab wrote: > > > > On 2016/11/15 20:32:36, robliao wrote: > > > > > On 2016/11/15 20:31:51, robliao wrote: > > > > > > Hitting this DCHECK and the one below seems like it would be pretty > bad > > as > > > > no > > > > > > workers would be allocated to create tasks. Maybe we should CHECK > > > instead? > > > > > > > > > > create tasks -> run tasks > > > > > > > > No need to CHECK IMO, DCHECK documents runtime invariants. CHECK is meant > to > > > > verify bad input that could cause security issues. > > > > > > > > > > > > > > https://chromium.googlesource.com/chromium/src/+/master/styleguide/c++/c++.md... > > > > > > This would be pretty fatal to the process. We already CHECK that > > > SchedulerWorkerPoolImpl::Initialize provides at least one worker thread > > because > > > we won't make progress otherwise. Bringing that CHECK here would cover the > > input > > > case (and we wouldn't have to disambiguate between the OOM case and bad > > inputs). > > > > These DCHECKs will only fail if GetTaskSchedulerInitializationArguments() > isn't > > properly implemented. Such a problem is easy to catch on developer machines > and > > there is little value to having CHECKs for it in production code. > > Agreed. > > > > > The CHECKs in TaskSchedulerImpl::Initialize() may fail even if there is no > error > > in our code (e.g. CreateThread fails). For our users, a process that is > > terminated is better than having a process that can't run tasks. > > > > Since the style guide says that we may only use CHECK to prevent security > > vulnerabilities or to temporarily to catch errors in the wild, we might have > to > > find an alternative way to exit the process when there are errors in > > TaskSchedulerImpl::Initialize(). > > Meh, I'm fine with the current use of CHECK for hard exit on system failure to > create threads. Agreed on that. My reading on the CHECK is you'd want to fire them at the earliest point when you know you're going to cause a fatal error. Similar to how use use DCHECKs for pointers, it identifies at the earliest point in time where things went wrong. If we CHECK during initialize, we have to disambiguate between a thread creation failure and a bad input failure.
lgtm in the meantime.
The CQ bit was checked by fdoray@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: android_compile_dbg on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_comp...) cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linu...)
The CQ bit was checked by fdoray@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by fdoray@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: blimp_linux_dbg on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/blimp_linux_dbg...) cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linu...)
The CQ bit was checked by fdoray@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by fdoray@chromium.org
The CQ bit was checked by fdoray@chromium.org to run a CQ dry run
PTAnL - GetTaskSchedulerInitializationArguments() now returns an std::vector<base::SchedulerWorkerPoolParams> and a Callback.
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linu...)
https://codereview.chromium.org/2491823005/diff/240001/content/public/rendere... File content/public/renderer/content_renderer_client.cc (right): https://codereview.chromium.org/2491823005/diff/240001/content/public/rendere... content/public/renderer/content_renderer_client.cc:25: FOREGROUND_WORKER_POOL, Not used anywhere but in GetTaskSchedulerWorkerPoolIndexForTraits()? I think you had DCHECK_EQ comparing size before insertion with these before, I guess that'd be one way to highlight where they come from? Or we could just use 0/1 directly IMO if everything is inlined below and it's clear. https://codereview.chromium.org/2491823005/diff/240001/content/public/rendere... content/public/renderer/content_renderer_client.cc:35: } I'd prefer for this to be inlined in method's scope. https://codereview.chromium.org/2491823005/diff/240001/content/public/rendere... content/public/renderer/content_renderer_client.cc:92: constexpr int kForegroundThreadsOffset = 0; These constants are probably too high for the renderers (unlike the browser there's more than one instance of them). "8" as a magic number was initially based on 3 BlockingPool + 5 CachePool being the main consumers in browser land. Thoughts on what magic numbers make sense for the renderers? https://codereview.chromium.org/2491823005/diff/240001/content/renderer/rende... File content/renderer/render_process_impl.cc (right): https://codereview.chromium.org/2491823005/diff/240001/content/renderer/rende... content/renderer/render_process_impl.cc:80: base::Callback<size_t(const base::TaskTraits& traits)> Feels like this type should be defined somewhere. using SchedulerWorkerPoolSelector = Callback<size_t(const TaskTraits& traits)>; in task_scheduler.h? https://codereview.chromium.org/2491823005/diff/240001/content/renderer/rende... content/renderer/render_process_impl.cc:96: base::SequencedWorkerPool::RedirectToTaskSchedulerForProcess(); else EnableForProcess? (won't there be a clash with your other CL if redirect/enable decision isn't in same place? or is this just because this one doesn't currently depend on the other?)
The CQ bit was checked by fdoray@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_comp...) mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by fdoray@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Initialize TaskScheduler in renderers. This CL initializes TaskScheduler in renderers using arguments provided by the ContentRendererClient. By default, no tasks are redirected to TaskScheduler. BUG=664996 ========== to ========== Initialize TaskScheduler in renderers. This CL initializes TaskScheduler in renderers using default arguments. ContentRenderClient may provide different arguments. BUG=664996 ==========
PTAnL - I rewrote everything to mimic TaskScheduler initialization in the browser process. I'm working on a separate CL to allow ChromeContentRendererClient to provide its own initialization arguments.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_comp...)
https://codereview.chromium.org/2491823005/diff/300001/content/renderer/rende... File content/renderer/render_process_impl.cc (right): https://codereview.chromium.org/2491823005/diff/300001/content/renderer/rende... content/renderer/render_process_impl.cc:116: base::RecommendedMaxNumberOfThreadsInPool(8, 32, 0.3, 0), Don't think we want nearly that many threads. Let's discuss offline.
The CQ bit was checked by fdoray@chromium.org to run a CQ dry run
PTAnL
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
lgtm https://codereview.chromium.org/2491823005/diff/340001/content/renderer/rende... File content/renderer/render_process_impl.cc (right): https://codereview.chromium.org/2491823005/diff/340001/content/renderer/rende... content/renderer/render_process_impl.cc:87: base::RecommendedMaxNumberOfThreadsInPool(1, 2, 1, 0), Thought we'd said 2-4?
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
lgtm
https://codereview.chromium.org/2491823005/diff/340001/content/renderer/rende... File content/renderer/render_process_impl.cc (right): https://codereview.chromium.org/2491823005/diff/340001/content/renderer/rende... content/renderer/render_process_impl.cc:87: base::RecommendedMaxNumberOfThreadsInPool(1, 2, 1, 0), On 2016/12/09 23:19:42, gab wrote: > Thought we'd said 2-4? Done.
Description was changed from ========== Initialize TaskScheduler in renderers. This CL initializes TaskScheduler in renderers using default arguments. ContentRenderClient may provide different arguments. BUG=664996 ========== to ========== Initialize TaskScheduler in renderers. This CL initializes TaskScheduler in renderers using default arguments. ContentRenderClient may provide different arguments. Initially, no threads will be created by TaskScheduler in renderers because no tasks are posted to it and pools are initialized with StandbyThreadPolicy::LAZY. In a separate, we will start running v8 tasks in TaskScheduler rather than WorkerPool (https://cs.chromium.org/chromium/src/gin/v8_platform.cc?sq=package:chromium&l...). BUG=664996 ==========
fdoray@chromium.org changed reviewers: + jam@chromium.org
jam@: PTAL
lgtm https://codereview.chromium.org/2491823005/diff/360001/content/renderer/rende... File content/renderer/render_process_impl.cc (right): https://codereview.chromium.org/2491823005/diff/360001/content/renderer/rende... content/renderer/render_process_impl.cc:80: StandbyThreadPolicy::LAZY, 1, all the numbers here and below are magic to someone not familiar with it. please move them to constants https://codereview.chromium.org/2491823005/diff/360001/content/renderer/rende... content/renderer/render_process_impl.cc:108: bool IsSingleProcess() { nit: we don't generally use helper methods for checking one command line flag
https://codereview.chromium.org/2491823005/diff/360001/content/renderer/rende... File content/renderer/render_process_impl.cc (right): https://codereview.chromium.org/2491823005/diff/360001/content/renderer/rende... content/renderer/render_process_impl.cc:80: StandbyThreadPolicy::LAZY, 1, On 2016/12/13 01:28:22, jam wrote: > all the numbers here and below are magic to someone not familiar with it. please > move them to constants Done. https://codereview.chromium.org/2491823005/diff/360001/content/renderer/rende... content/renderer/render_process_impl.cc:108: bool IsSingleProcess() { On 2016/12/13 01:28:22, jam wrote: > nit: we don't generally use helper methods for checking one command line flag Done.
The CQ bit was checked by fdoray@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from gab@chromium.org, robliao@chromium.org, jam@chromium.org Link to the patchset: https://codereview.chromium.org/2491823005/#ps380001 (title: "CR jam #76")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 380001, "attempt_start_ts": 1481645999047150, "parent_rev": "f12925ef31acf576805b97c6caf8bbc002864652", "commit_rev": "6ff58fd004a739e9c0c95fad2c73131a7587ed08"}
Message was sent while issue was closed.
Description was changed from ========== Initialize TaskScheduler in renderers. This CL initializes TaskScheduler in renderers using default arguments. ContentRenderClient may provide different arguments. Initially, no threads will be created by TaskScheduler in renderers because no tasks are posted to it and pools are initialized with StandbyThreadPolicy::LAZY. In a separate, we will start running v8 tasks in TaskScheduler rather than WorkerPool (https://cs.chromium.org/chromium/src/gin/v8_platform.cc?sq=package:chromium&l...). BUG=664996 ========== to ========== Initialize TaskScheduler in renderers. This CL initializes TaskScheduler in renderers using default arguments. ContentRenderClient may provide different arguments. Initially, no threads will be created by TaskScheduler in renderers because no tasks are posted to it and pools are initialized with StandbyThreadPolicy::LAZY. In a separate, we will start running v8 tasks in TaskScheduler rather than WorkerPool (https://cs.chromium.org/chromium/src/gin/v8_platform.cc?sq=package:chromium&l...). BUG=664996 Review-Url: https://codereview.chromium.org/2491823005 ==========
Message was sent while issue was closed.
Committed patchset #20 (id:380001)
Message was sent while issue was closed.
Description was changed from ========== Initialize TaskScheduler in renderers. This CL initializes TaskScheduler in renderers using default arguments. ContentRenderClient may provide different arguments. Initially, no threads will be created by TaskScheduler in renderers because no tasks are posted to it and pools are initialized with StandbyThreadPolicy::LAZY. In a separate, we will start running v8 tasks in TaskScheduler rather than WorkerPool (https://cs.chromium.org/chromium/src/gin/v8_platform.cc?sq=package:chromium&l...). BUG=664996 Review-Url: https://codereview.chromium.org/2491823005 ========== to ========== Initialize TaskScheduler in renderers. This CL initializes TaskScheduler in renderers using default arguments. ContentRenderClient may provide different arguments. Initially, no threads will be created by TaskScheduler in renderers because no tasks are posted to it and pools are initialized with StandbyThreadPolicy::LAZY. In a separate, we will start running v8 tasks in TaskScheduler rather than WorkerPool (https://cs.chromium.org/chromium/src/gin/v8_platform.cc?sq=package:chromium&l...). BUG=664996 Committed: https://crrev.com/d2233a758df698c669341ef2e49b1ad2b23ce8da Cr-Commit-Position: refs/heads/master@{#438202} ==========
Message was sent while issue was closed.
Patchset 20 (id:??) landed as https://crrev.com/d2233a758df698c669341ef2e49b1ad2b23ce8da Cr-Commit-Position: refs/heads/master@{#438202} |