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

Issue 2749303002: [reference - do not submit] Always create four pools in TaskSchedulerImpl. (Closed)

Created:
3 years, 9 months ago by fdoray
Modified:
3 years, 7 months ago
Reviewers:
robliao, gab
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, vmpstr+watch_chromium.org, robliao+watch_chromium.org, jam, gab+watch_chromium.org, darin-cc_chromium.org, fdoray+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Always create four pools in TaskSchedulerImpl. Instead of letting callers choose the number of pools and the mapping between TaskTraits and pool index, always create four pools with predefined thread priorities. This change is required to queue tasks before TaskScheduler initialization. BUG=690706

Patch Set 1 #

Patch Set 2 : Fix errors #

Patch Set 3 : Fix errors #

Patch Set 4 : self-review #

Patch Set 5 : self-review #

Patch Set 6 : self-review #

Patch Set 7 : self-review #

Patch Set 8 : Fix errors #

Patch Set 9 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+525 lines, -813 lines) Patch
M base/task_scheduler/scheduler_single_thread_task_runner_manager.h View 1 2 3 4 5 6 7 4 chunks +10 lines, -9 lines 0 comments Download
M base/task_scheduler/scheduler_single_thread_task_runner_manager.cc View 1 2 3 4 5 6 7 8 3 chunks +11 lines, -20 lines 0 comments Download
M base/task_scheduler/scheduler_single_thread_task_runner_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 chunks +21 lines, -59 lines 0 comments Download
M base/task_scheduler/scheduler_worker_pool_impl.h View 1 2 3 4 5 6 7 8 4 chunks +16 lines, -8 lines 0 comments Download
M base/task_scheduler/scheduler_worker_pool_impl.cc View 1 2 3 4 5 6 7 8 4 chunks +11 lines, -5 lines 0 comments Download
M base/task_scheduler/scheduler_worker_pool_impl_unittest.cc View 1 2 3 4 5 6 7 8 3 chunks +6 lines, -8 lines 0 comments Download
M base/task_scheduler/scheduler_worker_pool_params.h View 1 2 3 3 chunks +9 lines, -15 lines 0 comments Download
M base/task_scheduler/scheduler_worker_pool_params.cc View 2 chunks +10 lines, -5 lines 0 comments Download
M base/task_scheduler/task_scheduler.h View 1 2 3 4 5 6 7 8 4 chunks +33 lines, -18 lines 0 comments Download
M base/task_scheduler/task_scheduler.cc View 1 2 3 4 5 6 7 8 2 chunks +55 lines, -19 lines 0 comments Download
M base/task_scheduler/task_scheduler_impl.h View 1 2 3 4 5 6 7 5 chunks +9 lines, -14 lines 0 comments Download
M base/task_scheduler/task_scheduler_impl.cc View 1 2 3 4 5 6 7 8 5 chunks +77 lines, -26 lines 0 comments Download
M base/task_scheduler/task_scheduler_impl_unittest.cc View 2 chunks +15 lines, -38 lines 0 comments Download
M base/test/scoped_async_task_scheduler.cc View 2 chunks +5 lines, -12 lines 0 comments Download
M base/threading/sequenced_worker_pool_unittest.cc View 1 2 3 1 chunk +4 lines, -6 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -4 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -11 lines 0 comments Download
M chrome/renderer/chrome_content_renderer_client.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -4 lines 0 comments Download
M chrome/renderer/chrome_content_renderer_client.cc View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -10 lines 0 comments Download
M components/task_scheduler_util/browser/initialization.h View 1 2 3 1 chunk +6 lines, -16 lines 0 comments Download
M components/task_scheduler_util/browser/initialization.cc View 1 2 3 2 chunks +12 lines, -42 lines 0 comments Download
M components/task_scheduler_util/common/variations_util.h View 1 2 3 2 chunks +17 lines, -30 lines 0 comments Download
M components/task_scheduler_util/common/variations_util.cc View 4 chunks +13 lines, -73 lines 0 comments Download
M components/task_scheduler_util/common/variations_util_unittest.cc View 4 chunks +30 lines, -119 lines 0 comments Download
M components/task_scheduler_util/renderer/initialization.h View 1 chunk +7 lines, -17 lines 0 comments Download
M components/task_scheduler_util/renderer/initialization.cc View 1 chunk +17 lines, -43 lines 0 comments Download
M content/browser/browser_main_loop.cc View 1 2 3 4 5 6 7 8 3 chunks +47 lines, -68 lines 0 comments Download
M content/child/child_process.h View 1 2 3 2 chunks +11 lines, -10 lines 0 comments Download
M content/child/child_process.cc View 1 2 3 4 5 6 7 8 3 chunks +8 lines, -9 lines 0 comments Download
M content/public/browser/content_browser_client.h View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -7 lines 0 comments Download
M content/public/browser/content_browser_client.cc View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -0 lines 0 comments Download
M content/public/renderer/content_renderer_client.h View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -7 lines 0 comments Download
M content/public/renderer/content_renderer_client.cc View 1 2 3 4 5 6 7 1 chunk +5 lines, -0 lines 0 comments Download
M content/renderer/render_process.h View 1 2 3 4 2 chunks +5 lines, -5 lines 0 comments Download
M content/renderer/render_process.cc View 1 2 3 4 1 chunk +4 lines, -5 lines 0 comments Download
M content/renderer/render_process_impl.h View 1 2 3 4 2 chunks +2 lines, -5 lines 0 comments Download
M content/renderer/render_process_impl.cc View 1 2 3 4 5 chunks +25 lines, -66 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 19 (12 generated)
fdoray
PTAL
3 years, 9 months ago (2017-03-16 12:34:21 UTC) #11
gab
This CL is massive =S! Any way to split it up or tips on reviewing ...
3 years, 9 months ago (2017-03-20 16:45:53 UTC) #14
robliao
On 2017/03/20 16:45:53, gab wrote: > This CL is massive =S! Any way to split ...
3 years, 9 months ago (2017-03-20 17:05:16 UTC) #15
gab
On 2017/03/20 17:05:16, robliao wrote: > On 2017/03/20 16:45:53, gab wrote: > > This CL ...
3 years, 9 months ago (2017-03-20 17:09:34 UTC) #16
robliao
On 2017/03/20 17:09:34, gab wrote: > On 2017/03/20 17:05:16, robliao wrote: > > On 2017/03/20 ...
3 years, 9 months ago (2017-03-20 17:13:24 UTC) #17
gab
On 2017/03/20 17:13:24, robliao wrote: > On 2017/03/20 17:09:34, gab wrote: > > On 2017/03/20 ...
3 years, 9 months ago (2017-03-20 17:52:20 UTC) #18
fdoray
3 years, 9 months ago (2017-03-20 20:15:55 UTC) #19
On 2017/03/20 17:52:20, gab wrote:
> On 2017/03/20 17:13:24, robliao wrote:
> > On 2017/03/20 17:09:34, gab wrote:
> > > On 2017/03/20 17:05:16, robliao wrote:
> > > > On 2017/03/20 16:45:53, gab wrote:
> > > > > This CL is massive =S! Any way to split it up or tips on reviewing
> order?
> > > > 
> > > > The way to do this is the same way we've been doing the task scheduler
:-)
> > > > 
> > > > 1) Create the new API. Deprecate the old API. Have the old API call the
> new
> > > API.
> > > > 2) Migrate all callers incrementally.
> > > > 3) Remove the old API.
> > > 
> > > Right, though I could see why keeping both in parallel could be more
> > burdensome
> > > than the added benefit in this case. So maybe just tips for reviewing are
> > > sufficient?
> > 
> > It makes OWNER reviews in content much easier to go this way. Instead of
> seeing
> > a large changelist as we all did, they instead see a targeted CL.
> 
> True, @fdoray is it much harder to go that route?

"Have the old API call the new API." Doesn't work well since the new API is more
restrictive than the old one. It works the other way around:
1) Create the new API. Deprecate the old API. Have the *new API* call the *old
API*.
2) Migrate all callers to the new API incrementally.
3) Remove the old API.

https://codereview.chromium.org/2764603002/

Powered by Google App Engine
This is Rietveld 408576698