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

Issue 2077413009: Add TaskPriority as a parameter to SequencedWorkerPool in preparation for TaskScheduler experiment. (Closed)

Created:
4 years, 6 months ago by gab
Modified:
4 years, 5 months ago
CC:
cbentzel+watch_chromium.org, chromium-reviews, darin-cc_chromium.org, gavinp+disk_chromium.org, kalyank, kinuko+cache_chromium.org, ortuno+watch_chromium.org, sadrul, scheib+watch_chromium.org, tracing+reviews_chromium.org, wfh+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@a2_hook
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add TaskPriority as a parameter to SequencedWorkerPool in preparation for TaskScheduler experiment. (ref. http://crbug.com/622400 for experiment details) The mapping should be as follows: - TaskPriority::USER_BLOCKING : the pool runs tasks that are on the blocking path to responding to a user action. - TaskPriority::USER_VISIBLE : the pool runs tasks that must not block (i.e. have visible outcomes) but can be re-ordered behind USER_BLOCKING work. - TaskPriority::BACKGROUND : the pool runs non-critical background tasks that should not interfere with foreground work. Since each pool can only be assigned a single priority (until we do the full migration and each TaskRunner extracted from it can have its own priority), the highest priority among all tasks running in that pool should be picked if the pool runs multiple types of tasks. Note: for usage in unittests I picked USER_VISIBLE since tests shouldn't run at background OS priority but it's okay if USER_BLOCKING work gets re-ordered ahead of the test's tasks. A TestTaskScheduler will likely soon replace those use cases. BUG=553459, 622400 Committed: https://crrev.com/5fc3fafd0a77ca8acd30ddc8cfa17fd669eb9b56 Cr-Commit-Position: refs/heads/master@{#406481}

Patch Set 1 #

Total comments: 10

Patch Set 2 : review:jam #

Total comments: 6

Patch Set 3 : review:scheib/eroman 2x USER_BLOCKING->USER_VISIBLE + format #

Patch Set 4 : fix compile (+child_process_host_unittest.cc) #

Total comments: 2

Patch Set 5 : add dhcp_proxy_script_adapter_fetcher_win_unittest.cc => USER_VISIBLE #

Patch Set 6 : +ios/, +net\disk_cache\blockfile\file_posix.cc => USER_BLOCKING, tools\gn => USER_VISIBLE #

Patch Set 7 : +tools/gn => USER_VISIBLE #

Patch Set 8 : BlockingPool => USER_VISIBLE #

Patch Set 9 : fix ios compile #

Patch Set 10 : merge up to r404204 #

Patch Set 11 : re-add old constructor as deprecated for few remaining callers #

Patch Set 12 : tweak comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+101 lines, -36 lines) Patch
M ash/sysui/sysui_application.cc View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -1 line 0 comments Download
M base/test/sequenced_worker_pool_owner.cc View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -1 line 0 comments Download
M base/threading/sequenced_worker_pool.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +14 lines, -1 line 0 comments Download
M base/threading/sequenced_worker_pool.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +33 lines, -12 lines 0 comments Download
M base/trace_event/memory_dump_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/service/service_process.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download
M components/webcrypto/webcrypto_impl.cc View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -1 line 0 comments Download
M content/browser/browser_thread_impl.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -1 line 0 comments Download
M device/bluetooth/bluetooth_task_manager_win.cc View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M ios/chrome/browser/net/image_fetcher_unittest.mm View 1 2 3 4 5 6 7 1 chunk +3 lines, -1 line 0 comments Download
M ios/web/web_thread_impl.cc View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -1 line 0 comments Download
M net/disk_cache/blockfile/file_posix.cc View 1 2 3 4 5 1 chunk +4 lines, -1 line 0 comments Download
M net/disk_cache/simple/simple_backend_impl.cc View 1 chunk +3 lines, -1 line 0 comments Download
M net/proxy/dhcp_proxy_script_adapter_fetcher_win_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -3 lines 0 comments Download
M net/proxy/dhcp_proxy_script_fetcher_win.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M services/shell/runner/host/child_process_host_unittest.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M services/shell/standalone/context.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download
M tools/gn/header_checker.cc View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M tools/gn/scheduler.cc View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 72 (34 generated)
gab
Folks PTAL (there are many of you but you each have a very specific role, ...
4 years, 6 months ago (2016-06-22 18:14:22 UTC) #5
Ryan Sleevi
Eric is a better reviewer for the WebCrypto & Proxy changes. I'm a better reviewer ...
4 years, 6 months ago (2016-06-22 20:00:35 UTC) #7
sky
LGTM
4 years, 6 months ago (2016-06-22 20:02:38 UTC) #8
gab
On 2016/06/22 20:00:35, Ryan Sleevi wrote: > Eric is a better reviewer for the WebCrypto ...
4 years, 6 months ago (2016-06-22 20:06:21 UTC) #9
Ryan Sleevi
On 2016/06/22 20:06:21, gab wrote: > On 2016/06/22 20:00:35, Ryan Sleevi wrote: > > Eric ...
4 years, 6 months ago (2016-06-22 20:15:50 UTC) #13
jam
Two notes. I think we need to be very careful in how we pick the ...
4 years, 6 months ago (2016-06-22 20:17:37 UTC) #14
gab
On 2016/06/22 20:15:50, Ryan Sleevi wrote: > On 2016/06/22 20:06:21, gab wrote: > > On ...
4 years, 6 months ago (2016-06-22 21:00:15 UTC) #15
Ryan Sleevi
On 2016/06/22 21:00:15, gab wrote: > It will still run on a single-thread, just a ...
4 years, 6 months ago (2016-06-22 21:06:45 UTC) #16
gab
On 2016/06/22 20:17:37, jam wrote: > Two notes. I think we need to be very ...
4 years, 6 months ago (2016-06-22 21:08:56 UTC) #17
gab
On 2016/06/22 21:06:45, Ryan Sleevi wrote: > On 2016/06/22 21:00:15, gab wrote: > > It ...
4 years, 6 months ago (2016-06-22 21:11:48 UTC) #18
Ryan Sleevi
On 2016/06/22 21:11:48, gab (OOO back Monday) wrote: > It can't be interleaved with unrelated ...
4 years, 6 months ago (2016-06-22 21:28:57 UTC) #19
jam
On 2016/06/22 21:08:56, gab (OOO back Monday) wrote: > On 2016/06/22 20:17:37, jam wrote: > ...
4 years, 6 months ago (2016-06-22 21:38:45 UTC) #20
scheib
LGTM, though I note that perhaps the priority can be lower for Bluetooth: https://codereview.chromium.org/2077413009/diff/20001/device/bluetooth/bluetooth_task_manager_win.cc File ...
4 years, 6 months ago (2016-06-23 00:49:30 UTC) #21
eroman
LGTM for net/proxy/* and components/webcrypto/* https://codereview.chromium.org/2077413009/diff/20001/net/proxy/dhcp_proxy_script_fetcher_win.cc File net/proxy/dhcp_proxy_script_fetcher_win.cc (right): https://codereview.chromium.org/2077413009/diff/20001/net/proxy/dhcp_proxy_script_fetcher_win.cc#newcode62 net/proxy/dhcp_proxy_script_fetcher_win.cc:62: new base::SequencedWorkerPool(kMaxDhcpLookupThreads, "PacDhcpLookup", BTW ...
4 years, 6 months ago (2016-06-23 01:19:21 UTC) #22
Paweł Hajdan Jr.
base/test LGTM
4 years, 6 months ago (2016-06-23 14:58:11 UTC) #23
gab
Ping reviewers: nduca@chromium.org: - base/trace_event/memory_dump_manager_unittest.cc gene@chromium.org: - chrome/service/service_process.cc gavinp@chromium.org: - net/disk_cache/simple/simple_backend_impl.cc Main API change, danakj@chromium.org: ...
4 years, 5 months ago (2016-06-27 21:29:32 UTC) #29
Ryan Sleevi
Regarding other pools - it seems both Eric and I are uncertain what will happen ...
4 years, 5 months ago (2016-06-27 21:58:04 UTC) #30
eroman
On Mon, Jun 27, 2016 at 2:58 PM, <rsleevi@chromium.org> wrote: > Regarding other pools - ...
4 years, 5 months ago (2016-06-27 23:50:37 UTC) #31
Primiano Tucci (use gerrit)
base/trace_event LGTM
4 years, 5 months ago (2016-06-28 07:23:07 UTC) #32
gavinp
SimpleCache lgtm
4 years, 5 months ago (2016-06-28 14:26:49 UTC) #33
danakj
base/threading/ LGTM https://codereview.chromium.org/2077413009/diff/60001/base/threading/sequenced_worker_pool.cc File base/threading/sequenced_worker_pool.cc (right): https://codereview.chromium.org/2077413009/diff/60001/base/threading/sequenced_worker_pool.cc#newcode1267 base/threading/sequenced_worker_pool.cc:1267: inner_(new Inner(this, is this git cl formatted?
4 years, 5 months ago (2016-06-28 23:30:59 UTC) #34
gab
Thanks, ping gene@ and jam@ (see reply above) https://codereview.chromium.org/2077413009/diff/60001/base/threading/sequenced_worker_pool.cc File base/threading/sequenced_worker_pool.cc (right): https://codereview.chromium.org/2077413009/diff/60001/base/threading/sequenced_worker_pool.cc#newcode1267 base/threading/sequenced_worker_pool.cc:1267: inner_(new ...
4 years, 5 months ago (2016-06-29 18:25:04 UTC) #38
gab
On 2016/06/29 18:25:04, gab wrote: > Thanks, > > ping gene@ and jam@ (see reply ...
4 years, 5 months ago (2016-06-30 18:02:33 UTC) #41
gab
On 2016/06/30 18:02:33, gab wrote: > On 2016/06/29 18:25:04, gab wrote: > > Thanks, > ...
4 years, 5 months ago (2016-06-30 18:04:15 UTC) #42
Ryan Sleevi
lgtm
4 years, 5 months ago (2016-06-30 19:29:15 UTC) #45
jam
https://codereview.chromium.org/2077413009/diff/1/content/browser/browser_thread_impl.cc File content/browser/browser_thread_impl.cc (right): https://codereview.chromium.org/2077413009/diff/1/content/browser/browser_thread_impl.cc#newcode106 content/browser/browser_thread_impl.cc:106: base::TaskPriority::BACKGROUND)) { On 2016/06/27 21:29:32, gab wrote: > On ...
4 years, 5 months ago (2016-06-30 22:45:53 UTC) #46
gab
@jam: you're right, done. Reviewers left: @scottbyer@chromium.org: - chrome/service/service_process.cc @jam@chromium.org: - content/browser/browser_thread_impl.cc (comment addressed) - ...
4 years, 5 months ago (2016-07-05 13:53:44 UTC) #52
gab
ping: jam + scottbyer + brettw + sdefresne On 2016/07/05 13:53:44, gab wrote: > @jam: ...
4 years, 5 months ago (2016-07-07 14:49:58 UTC) #53
jam
On 2016/07/07 14:49:58, gab wrote: > ping: jam + scottbyer + brettw + sdefresne lgtm ...
4 years, 5 months ago (2016-07-12 21:14:04 UTC) #55
brettw
tools/gn lgtm
4 years, 5 months ago (2016-07-12 21:19:46 UTC) #56
sdefresne
ios/ lgtm Sorry, completely missed the initial review request and the ping. Feel free to ...
4 years, 5 months ago (2016-07-13 08:21:45 UTC) #57
Scott Byer
lgtm
4 years, 5 months ago (2016-07-18 15:58:54 UTC) #59
gab
Thanks all, re-added old constructor (as deprecated) for few remaining callers (SSLPlatformKeyTaskRunner and OOMKillsMonitor; which ...
4 years, 5 months ago (2016-07-19 18:55:11 UTC) #61
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/2077413009/260001
4 years, 5 months ago (2016-07-19 18:57:36 UTC) #64
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/265339)
4 years, 5 months ago (2016-07-19 23:04:42 UTC) #66
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/2077413009/260001
4 years, 5 months ago (2016-07-20 01:47:59 UTC) #68
commit-bot: I haz the power
Committed patchset #12 (id:260001)
4 years, 5 months ago (2016-07-20 04:23:39 UTC) #70
commit-bot: I haz the power
4 years, 5 months ago (2016-07-20 04:26:40 UTC) #72
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/5fc3fafd0a77ca8acd30ddc8cfa17fd669eb9b56
Cr-Commit-Position: refs/heads/master@{#406481}

Powered by Google App Engine
This is Rietveld 408576698