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

Issue 14689004: Re-land: cc: Cancel and re-prioritize worker pool tasks. (Closed)

Created:
7 years, 7 months ago by reveman
Modified:
7 years, 6 months ago
Reviewers:
nduca, vmpstr, enne (OOO)
CC:
chromium-reviews, cc-bugs_chromium.org
Visibility:
Public.

Description

Re-land: cc: Cancel and re-prioritize worker pool tasks. This adds a task graph interface to the worker pool and implements a simple queue instance of this interface for use by the tile manager. The task graph interface can be used describe more complicated task dependencies in the future and provides the immediate benefit of seamlessly being able to cancel and re-prioritize tasks. BUG=178974, 244642 TEST=cc_unittests --gtest_filter=WorkerPoolTest.Dependencies Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=203041

Patch Set 1 #

Total comments: 18

Patch Set 2 : address review feedback #

Patch Set 3 : move alignment check to RP #

Total comments: 12

Patch Set 4 : cancel scheduled tasks at shutdown #

Patch Set 5 : Added support for dependencies and tests. #

Total comments: 2

Patch Set 6 : Rebase and some re-factoring #

Patch Set 7 : keep image cache check #

Total comments: 8

Patch Set 8 : Add more comments and cleanup WorkerPool::Inner::ScheduleTasks #

Patch Set 9 : update a few comments in TileManager #

Patch Set 10 : s/was_cancelled/was_canceled/ #

Patch Set 11 : Check and prevent worker pool reentrancy during dispatch of completion callbacks #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1197 lines, -448 lines) Patch
M cc/base/scoped_ptr_hash_map.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M cc/base/worker_pool.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +39 lines, -35 lines 0 comments Download
M cc/base/worker_pool.cc View 1 2 3 4 5 6 7 8 9 10 13 chunks +382 lines, -115 lines 0 comments Download
A cc/base/worker_pool_perftest.cc View 1 2 3 4 5 1 chunk +234 lines, -0 lines 0 comments Download
M cc/base/worker_pool_unittest.cc View 1 2 3 4 5 3 chunks +144 lines, -38 lines 0 comments Download
M cc/cc_tests.gyp View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -2 lines 0 comments Download
M cc/resources/managed_tile_state.h View 1 2 3 4 5 2 chunks +3 lines, -4 lines 0 comments Download
M cc/resources/raster_worker_pool.h View 1 2 3 4 5 3 chunks +59 lines, -6 lines 0 comments Download
M cc/resources/raster_worker_pool.cc View 1 2 3 4 5 2 chunks +113 lines, -19 lines 0 comments Download
M cc/resources/resource_provider.cc View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M cc/resources/tile_manager.h View 1 2 3 4 5 6 7 8 9 8 chunks +18 lines, -21 lines 0 comments Download
M cc/resources/tile_manager.cc View 1 2 3 4 5 6 7 8 9 10 15 chunks +198 lines, -206 lines 0 comments Download
M cc/test/fake_tile_manager.h View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 28 (0 generated)
reveman
7 years, 7 months ago (2013-05-06 17:01:58 UTC) #1
vmpstr
Just a first run through. I'm sorry if some comments are a bit silly, I'm ...
7 years, 7 months ago (2013-05-06 18:05:51 UTC) #2
reveman
https://codereview.chromium.org/14689004/diff/1/cc/resources/raster_worker_pool.cc File cc/resources/raster_worker_pool.cc (right): https://codereview.chromium.org/14689004/diff/1/cc/resources/raster_worker_pool.cc#newcode76 cc/resources/raster_worker_pool.cc:76: } On 2013/05/06 18:05:51, vmpstr wrote: > nit: I ...
7 years, 7 months ago (2013-05-06 21:36:27 UTC) #3
vmpstr
This is looking very good. Some more comments: https://codereview.chromium.org/14689004/diff/7001/cc/base/worker_pool.cc File cc/base/worker_pool.cc (right): https://codereview.chromium.org/14689004/diff/7001/cc/base/worker_pool.cc#newcode288 cc/base/worker_pool.cc:288: if ...
7 years, 7 months ago (2013-05-06 23:08:48 UTC) #4
reveman
https://codereview.chromium.org/14689004/diff/7001/cc/base/worker_pool.cc File cc/base/worker_pool.cc (right): https://codereview.chromium.org/14689004/diff/7001/cc/base/worker_pool.cc#newcode288 cc/base/worker_pool.cc:288: if (shutdown_) Yes, we could cancel all pending tasks ...
7 years, 7 months ago (2013-05-07 01:33:54 UTC) #5
vmpstr
lgtm
7 years, 7 months ago (2013-05-09 00:29:52 UTC) #6
nduca
I gave this more thought on the flight, and I really think a model of ...
7 years, 7 months ago (2013-05-10 21:23:06 UTC) #7
reveman
On 2013/05/10 21:23:06, nduca wrote: > I gave this more thought on the flight, and ...
7 years, 7 months ago (2013-05-14 00:29:02 UTC) #8
reveman
Latest patch includes full support for task dependencies. I think it's cleaner and easier to ...
7 years, 7 months ago (2013-05-20 23:09:26 UTC) #9
nduca
https://codereview.chromium.org/14689004/diff/19001/cc/base/worker_pool.h File cc/base/worker_pool.h (right): https://codereview.chromium.org/14689004/diff/19001/cc/base/worker_pool.h#newcode46 cc/base/worker_pool.h:46: I guess i'm still puzzled why we have dependency ...
7 years, 7 months ago (2013-05-21 00:31:12 UTC) #10
reveman
https://codereview.chromium.org/14689004/diff/19001/cc/base/worker_pool.h File cc/base/worker_pool.h (right): https://codereview.chromium.org/14689004/diff/19001/cc/base/worker_pool.h#newcode46 cc/base/worker_pool.h:46: There's a 1-N relationship between tasks and dependency graphs. ...
7 years, 7 months ago (2013-05-21 01:22:36 UTC) #11
nduca
It seems to me that if you had tasks have dependencies, then when you enqueue ...
7 years, 7 months ago (2013-05-21 02:12:26 UTC) #12
Tom Hudson
I still don't understand why "cancel and reprioritize" means we have to have a general ...
7 years, 7 months ago (2013-05-21 11:40:05 UTC) #13
reveman
On 2013/05/21 02:12:26, nduca wrote: > It seems to me that if you had tasks ...
7 years, 7 months ago (2013-05-21 16:18:26 UTC) #14
reveman
On 2013/05/21 11:40:05, Tom Hudson wrote: > I still don't understand why "cancel and reprioritize" ...
7 years, 7 months ago (2013-05-21 16:21:25 UTC) #15
Tom Hudson
On 2013/05/21 16:21:25, David Reveman wrote: > On 2013/05/21 11:40:05, Tom Hudson wrote: > > ...
7 years, 7 months ago (2013-05-21 16:55:53 UTC) #16
reveman
7 years, 7 months ago (2013-05-21 20:11:23 UTC) #17
reveman
I think this is ready for another round of reviews. Here's what changed: - tasks ...
7 years, 7 months ago (2013-05-23 22:21:32 UTC) #18
vmpstr
https://codereview.chromium.org/14689004/diff/34001/cc/base/worker_pool.cc File cc/base/worker_pool.cc (right): https://codereview.chromium.org/14689004/diff/34001/cc/base/worker_pool.cc#newcode23 cc/base/worker_pool.cc:23: #if defined(COMPILER_GCC) Does this part just work with clang? ...
7 years, 7 months ago (2013-05-24 17:01:36 UTC) #19
vmpstr
Do you think it would be more clear if you separated this into more files? ...
7 years, 7 months ago (2013-05-24 17:33:52 UTC) #20
reveman
I'd like to avoid more files at this time. I think the number of task ...
7 years, 7 months ago (2013-05-24 18:53:48 UTC) #21
nduca
this looks great. lgtm.
7 years, 7 months ago (2013-05-24 21:08:30 UTC) #22
vmpstr
lgtm, thanks for the comments.
7 years, 7 months ago (2013-05-24 21:34:26 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/reveman@chromium.org/14689004/51001
7 years, 7 months ago (2013-05-26 16:19:40 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/reveman@chromium.org/14689004/65001
7 years, 7 months ago (2013-05-27 00:10:40 UTC) #25
commit-bot: I haz the power
Change committed as 202363
7 years, 7 months ago (2013-05-27 03:07:35 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/reveman@chromium.org/14689004/78001
7 years, 6 months ago (2013-05-29 21:11:49 UTC) #27
commit-bot: I haz the power
7 years, 6 months ago (2013-05-30 03:34:14 UTC) #28
Message was sent while issue was closed.
Change committed as 203041

Powered by Google App Engine
This is Rietveld 408576698