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

Issue 12217105: cc: Check for completed raster tasks at interval. (Closed)

Created:
7 years, 10 months ago by reveman
Modified:
7 years, 10 months ago
CC:
chromium-reviews, cc-bugs_chromium.org, Sami
Visibility:
Public.

Description

cc: Check for completed raster tasks at interval. This significantly reduces the context switching overhead for impl-side painting. Instead of posting reply task to the impl thread after completing each raster job, post a reply only when worker pool becomes idle and poll for completed tasks at a 6ms interval. This doesn't just make rasterization more efficient but also reduces the number of shallow flushes, which makes async uploads more efficient. BUG=173802 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=182404

Patch Set 1 #

Total comments: 14

Patch Set 2 : #

Patch Set 3 : address review feedback #

Patch Set 4 : Post task to impl thread when worker pool becomes idle. #

Total comments: 6

Patch Set 5 : confine polling to inside worker pool #

Total comments: 13

Patch Set 6 : Add DidFinishDispatchingCompletionCallbacks #

Total comments: 4

Patch Set 7 : tweak names #

Patch Set 8 : Remove MoreTasksCompleted. #

Patch Set 9 : Switch back to kNumPendingTasksPerWorker, seems good enough for now #

Total comments: 4

Patch Set 10 : Fix HasCompleted. #

Patch Set 11 : Fix race condition #

Total comments: 1

Patch Set 12 : Add missing CC_EXPORT. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+193 lines, -45 lines) Patch
M cc/raster_worker_pool.h View 1 2 3 5 2 chunks +4 lines, -3 lines 0 comments Download
M cc/raster_worker_pool.cc View 1 2 3 5 2 chunks +4 lines, -2 lines 0 comments Download
M cc/tile_manager.h View 1 2 3 4 5 6 7 8 9 5 chunks +11 lines, -3 lines 0 comments Download
M cc/tile_manager.cc View 1 2 3 4 5 6 7 8 9 5 chunks +14 lines, -5 lines 0 comments Download
M cc/worker_pool.h View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +52 lines, -8 lines 0 comments Download
M cc/worker_pool.cc View 1 2 3 4 5 6 7 8 9 10 7 chunks +108 lines, -24 lines 0 comments Download

Messages

Total messages: 28 (0 generated)
brianderson
I think polling at regular intervals is a good method for batching our uploads such ...
7 years, 10 months ago (2013-02-12 01:44:31 UTC) #1
reveman
I like the idea of posting a task to compositor thread once the raster pool ...
7 years, 10 months ago (2013-02-12 02:29:52 UTC) #2
reveman
Latest patch implements the idea of posting a task to the impl thread when the ...
7 years, 10 months ago (2013-02-12 21:39:13 UTC) #3
brianderson
I like the new idle detection. We can look into the other optimizations at a ...
7 years, 10 months ago (2013-02-13 01:19:57 UTC) #4
nduca
To recap, I think we dont have to delegate through the proxy for the message ...
7 years, 10 months ago (2013-02-13 01:33:18 UTC) #5
reveman
On 2013/02/13 01:33:18, nduca wrote: > To recap, I think we dont have to delegate ...
7 years, 10 months ago (2013-02-13 02:01:34 UTC) #6
nduca
Cool thanks for checking. Lets do your approach, though maybe we can confine the polling ...
7 years, 10 months ago (2013-02-13 03:18:55 UTC) #7
reveman
latest patch keeps all the polling logic inside the worker pool and adds a "more_tasks_completed" ...
7 years, 10 months ago (2013-02-13 08:12:51 UTC) #8
nduca
https://codereview.chromium.org/12217105/diff/4007/cc/tile_manager.cc File cc/tile_manager.cc (right): https://codereview.chromium.org/12217105/diff/4007/cc/tile_manager.cc#newcode655 cc/tile_manager.cc:655: if (need_shallow_flush_) { hmmm the position of this group ...
7 years, 10 months ago (2013-02-13 08:29:32 UTC) #9
reveman
https://codereview.chromium.org/12217105/diff/4007/cc/tile_manager.cc File cc/tile_manager.cc (right): https://codereview.chromium.org/12217105/diff/4007/cc/tile_manager.cc#newcode655 cc/tile_manager.cc:655: if (need_shallow_flush_) { On 2013/02/13 08:29:32, nduca wrote: > ...
7 years, 10 months ago (2013-02-13 08:46:38 UTC) #10
nduca
small nits, and to recap offline chat, lets maybe route the bool about last compelted ...
7 years, 10 months ago (2013-02-13 09:06:29 UTC) #11
nduca
This looks really solid. I think we're getting really close here. Nit below, and lets ...
7 years, 10 months ago (2013-02-13 10:53:37 UTC) #12
reveman
https://codereview.chromium.org/12217105/diff/4007/cc/worker_pool.cc File cc/worker_pool.cc (right): https://codereview.chromium.org/12217105/diff/4007/cc/worker_pool.cc#newcode133 cc/worker_pool.cc:133: while (!pending_tasks_.empty()) { On 2013/02/13 09:06:29, nduca wrote: > ...
7 years, 10 months ago (2013-02-13 15:32:57 UTC) #13
reveman
I think the simple handling IsBusy in latest patch is good enough for now. We'll ...
7 years, 10 months ago (2013-02-13 18:49:48 UTC) #14
nduca
LGTM. I think a good followup patch would be to remove completely the Worker object ...
7 years, 10 months ago (2013-02-13 22:42:45 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/reveman@chromium.org/12217105/21007
7 years, 10 months ago (2013-02-14 00:16:01 UTC) #16
brianderson
https://codereview.chromium.org/12217105/diff/21007/cc/worker_pool.cc File cc/worker_pool.cc (right): https://codereview.chromium.org/12217105/diff/21007/cc/worker_pool.cc#newcode140 cc/worker_pool.cc:140: if (pending_tasks_.front()->HasCompleted()) Should the condition be the inverse here? ...
7 years, 10 months ago (2013-02-14 00:26:50 UTC) #17
brianderson
https://codereview.chromium.org/12217105/diff/21007/cc/worker_pool.cc File cc/worker_pool.cc (right): https://codereview.chromium.org/12217105/diff/21007/cc/worker_pool.cc#newcode280 cc/worker_pool.cc:280: I think there is a race condition if the ...
7 years, 10 months ago (2013-02-14 00:42:40 UTC) #18
reveman
https://codereview.chromium.org/12217105/diff/21007/cc/worker_pool.cc File cc/worker_pool.cc (right): https://codereview.chromium.org/12217105/diff/21007/cc/worker_pool.cc#newcode140 cc/worker_pool.cc:140: if (pending_tasks_.front()->HasCompleted()) On 2013/02/14 00:26:50, Brian Anderson wrote: > ...
7 years, 10 months ago (2013-02-14 00:49:34 UTC) #19
brianderson
https://codereview.chromium.org/12217105/diff/21007/cc/worker_pool.cc File cc/worker_pool.cc (right): https://codereview.chromium.org/12217105/diff/21007/cc/worker_pool.cc#newcode280 cc/worker_pool.cc:280: On 2013/02/14 00:42:40, Brian Anderson wrote: > I think ...
7 years, 10 months ago (2013-02-14 00:49:41 UTC) #20
brianderson
lgtm https://codereview.chromium.org/12217105/diff/21008/cc/worker_pool.cc File cc/worker_pool.cc (right): https://codereview.chromium.org/12217105/diff/21008/cc/worker_pool.cc#newcode284 cc/worker_pool.cc:284: if (worker->num_pending_tasks()) { No race condition and no ...
7 years, 10 months ago (2013-02-14 01:12:06 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/reveman@chromium.org/12217105/21008
7 years, 10 months ago (2013-02-14 01:18:41 UTC) #22
commit-bot: I haz the power
Retried try job too often on linux_rel for step(s) base_unittests, browser_tests, cacheinvalidation_unittests, check_deps, chromedriver2_unittests, components_unittests, ...
7 years, 10 months ago (2013-02-14 01:43:55 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/12217105/21008
7 years, 10 months ago (2013-02-14 02:00:50 UTC) #24
commit-bot: I haz the power
Retried try job too often on linux_chromeos for step(s) aura_unittests, base_unittests, browser_tests, cacheinvalidation_unittests, check_deps, chromeos_unittests, ...
7 years, 10 months ago (2013-02-14 02:18:57 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/reveman@chromium.org/12217105/26012
7 years, 10 months ago (2013-02-14 05:05:52 UTC) #26
nduca
We should maybe dcommit? Or did we miss the build?
7 years, 10 months ago (2013-02-14 06:07:01 UTC) #27
klobag.chromium
7 years, 10 months ago (2013-02-14 06:14:51 UTC) #28
build is still waiting for this CL.

Powered by Google App Engine
This is Rietveld 408576698