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

Issue 2491823005: Initialize TaskScheduler in renderers. (Closed)

Created:
4 years, 1 month ago by fdoray
Modified:
4 years ago
Reviewers:
robliao, gab, jam
CC:
chromium-reviews, jam, darin-cc_chromium.org, mlamouri+watch-content_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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=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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+116 lines, -1 line) Patch
M content/public/renderer/content_renderer_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +10 lines, -1 line 0 comments Download
M content/renderer/render_process_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 5 chunks +106 lines, -0 lines 0 comments Download

Messages

Total messages: 85 (56 generated)
fdoray
PTAL Tests pass when ContentRendererClient::ShouldInitializeTaskScheduler() returns true (see patch set 3). I also verified that ...
4 years, 1 month ago (2016-11-14 15:32:49 UTC) #13
robliao
https://codereview.chromium.org/2491823005/diff/60001/content/renderer/render_process_impl.cc File content/renderer/render_process_impl.cc (right): https://codereview.chromium.org/2491823005/diff/60001/content/renderer/render_process_impl.cc#newcode64 content/renderer/render_process_impl.cc:64: bool MaybeInitializeTaskScheduler() { What's the behavior when base linked ...
4 years, 1 month ago (2016-11-14 16:05:26 UTC) #14
gab
https://codereview.chromium.org/2491823005/diff/60001/content/renderer/render_process_impl.cc File content/renderer/render_process_impl.cc (right): https://codereview.chromium.org/2491823005/diff/60001/content/renderer/render_process_impl.cc#newcode64 content/renderer/render_process_impl.cc:64: bool MaybeInitializeTaskScheduler() { On 2016/11/14 16:05:26, robliao wrote: > ...
4 years, 1 month ago (2016-11-14 16:16:43 UTC) #15
fdoray
PTAnL With this CL, TaskScheduler is always initialized in renderers. Before it lands, we will ...
4 years, 1 month ago (2016-11-15 16:30:35 UTC) #17
gab
lgtm % nits (should we add the experiment hooks in ChromeContentRendererClient in this CL as ...
4 years, 1 month ago (2016-11-15 20:25:05 UTC) #18
robliao
https://codereview.chromium.org/2491823005/diff/100001/content/public/renderer/content_renderer_client.h File content/public/renderer/content_renderer_client.h (right): https://codereview.chromium.org/2491823005/diff/100001/content/public/renderer/content_renderer_client.h#newcode142 content/public/renderer/content_renderer_client.h:142: // background pool and foreground pool, repectively. |background_reclaim_time| s/repectively/respectively/ ...
4 years, 1 month ago (2016-11-15 20:31:51 UTC) #19
robliao
https://codereview.chromium.org/2491823005/diff/100001/content/renderer/render_process_impl.cc File content/renderer/render_process_impl.cc (right): https://codereview.chromium.org/2491823005/diff/100001/content/renderer/render_process_impl.cc#newcode101 content/renderer/render_process_impl.cc:101: DCHECK_GT(max_background_threads, 0); On 2016/11/15 20:31:51, robliao wrote: > Hitting ...
4 years, 1 month ago (2016-11-15 20:32:36 UTC) #20
gab
https://codereview.chromium.org/2491823005/diff/100001/content/renderer/render_process_impl.cc File content/renderer/render_process_impl.cc (right): https://codereview.chromium.org/2491823005/diff/100001/content/renderer/render_process_impl.cc#newcode101 content/renderer/render_process_impl.cc:101: DCHECK_GT(max_background_threads, 0); On 2016/11/15 20:32:36, robliao wrote: > On ...
4 years, 1 month ago (2016-11-15 20:42:47 UTC) #21
robliao
https://codereview.chromium.org/2491823005/diff/100001/content/renderer/render_process_impl.cc File content/renderer/render_process_impl.cc (right): https://codereview.chromium.org/2491823005/diff/100001/content/renderer/render_process_impl.cc#newcode101 content/renderer/render_process_impl.cc:101: DCHECK_GT(max_background_threads, 0); On 2016/11/15 20:42:47, gab wrote: > On ...
4 years, 1 month ago (2016-11-15 20:49:09 UTC) #22
robliao
4 years, 1 month ago (2016-11-15 20:49:11 UTC) #23
gab
https://codereview.chromium.org/2491823005/diff/100001/content/renderer/render_process_impl.cc File content/renderer/render_process_impl.cc (right): https://codereview.chromium.org/2491823005/diff/100001/content/renderer/render_process_impl.cc#newcode101 content/renderer/render_process_impl.cc:101: DCHECK_GT(max_background_threads, 0); On 2016/11/15 20:49:08, robliao wrote: > On ...
4 years, 1 month ago (2016-11-15 22:04:30 UTC) #24
fdoray
All done. Working on the ChromeContentRendererClient CL and will add a link from this CL ...
4 years, 1 month ago (2016-11-16 16:40:52 UTC) #25
gab
https://codereview.chromium.org/2491823005/diff/100001/content/renderer/render_process_impl.cc File content/renderer/render_process_impl.cc (right): https://codereview.chromium.org/2491823005/diff/100001/content/renderer/render_process_impl.cc#newcode101 content/renderer/render_process_impl.cc:101: DCHECK_GT(max_background_threads, 0); On 2016/11/16 16:40:52, fdoray wrote: > On ...
4 years, 1 month ago (2016-11-16 16:58:06 UTC) #30
robliao
On 2016/11/16 16:58:06, gab wrote: > https://codereview.chromium.org/2491823005/diff/100001/content/renderer/render_process_impl.cc > File content/renderer/render_process_impl.cc (right): > > https://codereview.chromium.org/2491823005/diff/100001/content/renderer/render_process_impl.cc#newcode101 > ...
4 years, 1 month ago (2016-11-16 17:00:18 UTC) #31
robliao
lgtm in the meantime.
4 years, 1 month ago (2016-11-16 17:02:09 UTC) #32
fdoray
PTAnL - GetTaskSchedulerInitializationArguments() now returns an std::vector<base::SchedulerWorkerPoolParams> and a Callback.
4 years, 1 month ago (2016-11-18 17:04:18 UTC) #49
gab
https://codereview.chromium.org/2491823005/diff/240001/content/public/renderer/content_renderer_client.cc File content/public/renderer/content_renderer_client.cc (right): https://codereview.chromium.org/2491823005/diff/240001/content/public/renderer/content_renderer_client.cc#newcode25 content/public/renderer/content_renderer_client.cc:25: FOREGROUND_WORKER_POOL, Not used anywhere but in GetTaskSchedulerWorkerPoolIndexForTraits()? I think ...
4 years, 1 month ago (2016-11-18 18:32:00 UTC) #53
fdoray
PTAnL - I rewrote everything to mimic TaskScheduler initialization in the browser process. I'm working ...
4 years ago (2016-12-09 18:06:02 UTC) #61
gab
https://codereview.chromium.org/2491823005/diff/300001/content/renderer/render_process_impl.cc File content/renderer/render_process_impl.cc (right): https://codereview.chromium.org/2491823005/diff/300001/content/renderer/render_process_impl.cc#newcode116 content/renderer/render_process_impl.cc:116: base::RecommendedMaxNumberOfThreadsInPool(8, 32, 0.3, 0), Don't think we want nearly ...
4 years ago (2016-12-09 20:20:56 UTC) #64
fdoray
PTAnL
4 years ago (2016-12-09 21:57:33 UTC) #66
gab
lgtm https://codereview.chromium.org/2491823005/diff/340001/content/renderer/render_process_impl.cc File content/renderer/render_process_impl.cc (right): https://codereview.chromium.org/2491823005/diff/340001/content/renderer/render_process_impl.cc#newcode87 content/renderer/render_process_impl.cc:87: base::RecommendedMaxNumberOfThreadsInPool(1, 2, 1, 0), Thought we'd said 2-4?
4 years ago (2016-12-09 23:19:43 UTC) #68
robliao
lgtm
4 years ago (2016-12-12 16:16:21 UTC) #71
fdoray
https://codereview.chromium.org/2491823005/diff/340001/content/renderer/render_process_impl.cc File content/renderer/render_process_impl.cc (right): https://codereview.chromium.org/2491823005/diff/340001/content/renderer/render_process_impl.cc#newcode87 content/renderer/render_process_impl.cc:87: base::RecommendedMaxNumberOfThreadsInPool(1, 2, 1, 0), On 2016/12/09 23:19:42, gab wrote: ...
4 years ago (2016-12-12 16:20:08 UTC) #72
fdoray
jam@: PTAL
4 years ago (2016-12-12 20:52:57 UTC) #75
jam
lgtm https://codereview.chromium.org/2491823005/diff/360001/content/renderer/render_process_impl.cc File content/renderer/render_process_impl.cc (right): https://codereview.chromium.org/2491823005/diff/360001/content/renderer/render_process_impl.cc#newcode80 content/renderer/render_process_impl.cc:80: StandbyThreadPolicy::LAZY, 1, all the numbers here and below ...
4 years ago (2016-12-13 01:28:22 UTC) #76
fdoray
https://codereview.chromium.org/2491823005/diff/360001/content/renderer/render_process_impl.cc File content/renderer/render_process_impl.cc (right): https://codereview.chromium.org/2491823005/diff/360001/content/renderer/render_process_impl.cc#newcode80 content/renderer/render_process_impl.cc:80: StandbyThreadPolicy::LAZY, 1, On 2016/12/13 01:28:22, jam wrote: > all ...
4 years ago (2016-12-13 16:19:52 UTC) #77
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2491823005/380001
4 years ago (2016-12-13 16:20:32 UTC) #80
commit-bot: I haz the power
Committed patchset #20 (id:380001)
4 years ago (2016-12-13 17:19:38 UTC) #83
commit-bot: I haz the power
4 years ago (2016-12-13 17:23:46 UTC) #85
Message was sent while issue was closed.
Patchset 20 (id:??) landed as
https://crrev.com/d2233a758df698c669341ef2e49b1ad2b23ce8da
Cr-Commit-Position: refs/heads/master@{#438202}

Powered by Google App Engine
This is Rietveld 408576698