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

Issue 2572893002: [Reland] Dont post delayed DoWork for disabled queues. (Closed)

Created:
4 years ago by alex clarke (OOO till 29th)
Modified:
3 years, 10 months ago
Reviewers:
haraken, Sami, altimin
CC:
chromium-reviews, blink-reviews, scheduler-bugs_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Dont post delayed DoWork for disabled queues. We could do this for fences too but don't because that would break the throttling logic which needs to know when the next delayed task is due to be run. Contains a fix for the bug which previously was causing renderer hangs. TaskQueue::GetNextScheduledWakeUp must return base::nullopt for disabled queues because we no longer schedule wakeups for those. If we don't do this then the TaskQueueThrottler will be fed misleading data which causes it to misbehave. BUG=671669, 688422, 693672 Committed: https://crrev.com/cab9842ac55e5b9dab766f11c6e412949d854483 Cr-Original-Original-Original-Commit-Position: refs/heads/master@{#438962} Review-Url: https://codereview.chromium.org/2572893002 Cr-Original-Original-Commit-Position: refs/heads/master@{#447591} Committed: https://chromium.googlesource.com/chromium/src/+/9a8a61516e750796f74869167bb919a05551d4dd Review-Url: https://codereview.chromium.org/2572893002 Cr-Original-Commit-Position: refs/heads/master@{#450679} Committed: https://chromium.googlesource.com/chromium/src/+/c4b071b9088980c941d3dea85478b10675a479e6 Review-Url: https://codereview.chromium.org/2572893002 Cr-Commit-Position: refs/heads/master@{#451715} Committed: https://chromium.googlesource.com/chromium/src/+/2f16bd68bd7e191db66f96d2c761017902074d91

Patch Set 1 #

Patch Set 2 : Fix perftest #

Total comments: 8

Patch Set 3 : Fix LazyNow check #

Patch Set 4 : Fix nits and add a test #

Patch Set 5 : Rebased #

Patch Set 6 : Rebased #

Total comments: 2

Patch Set 7 : Keep track of which TimeDomain the delayed do works are associated with. #

Total comments: 8

Patch Set 8 : Address Sami's comments #

Patch Set 9 : Fix Test #

Patch Set 10 : Don't need LazyNow #

Patch Set 11 : Fix renderer hangs #

Patch Set 12 : TimeDomain::CancelDelayedWork shouldn't send a OnTimeDomainHasDelayedWork notification #

Total comments: 5

Patch Set 13 #

Patch Set 14 : Rebase #

Patch Set 15 : Fix bug with TaskQueueImpl::SetTimeDomain and disabled queue. #

Patch Set 16 : Fix compile #

Unified diffs Side-by-side diffs Delta from patch set Stats (+670 lines, -144 lines) Patch
M third_party/WebKit/Source/platform/scheduler/base/real_time_domain.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/scheduler/base/real_time_domain.cc View 1 2 3 4 5 6 7 8 9 1 chunk +7 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +25 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.h View 1 2 3 4 5 6 7 8 9 10 5 chunks +73 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc View 1 2 3 4 5 6 7 8 9 8 chunks +57 lines, -43 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/base/task_queue_manager_perftest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/scheduler/base/task_queue_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 19 chunks +325 lines, -44 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/base/task_queue_selector_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/base/time_domain.h View 1 2 3 4 5 6 7 8 9 1 chunk +9 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/base/time_domain.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +12 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/base/time_domain_unittest.cc View 1 2 3 4 5 6 7 8 9 10 9 chunks +87 lines, -20 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/base/virtual_time_domain.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/scheduler/base/virtual_time_domain.cc View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/renderer/auto_advancing_virtual_time_domain.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/scheduler/renderer/auto_advancing_virtual_time_domain.cc View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/renderer/task_queue_throttler_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +36 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/renderer/throttled_time_domain.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/scheduler/renderer/throttled_time_domain.cc View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -2 lines 0 comments Download
M third_party/WebKit/public/platform/scheduler/base/task_queue.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 128 (91 generated)
alex clarke (OOO till 29th)
PTAL
4 years ago (2016-12-13 22:16:29 UTC) #5
Sami
lgtm, nice optimization! https://codereview.chromium.org/2572893002/diff/20001/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc File third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc (right): https://codereview.chromium.org/2572893002/diff/20001/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc#newcode221 third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc:221: LazyNow* lazy_now, Not something for this ...
4 years ago (2016-12-14 16:29:38 UTC) #12
alex clarke (OOO till 29th)
haraken@chromium.org: Please review changes in TestingPlatformSupport.cpp https://codereview.chromium.org/2572893002/diff/20001/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc File third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc (right): https://codereview.chromium.org/2572893002/diff/20001/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc#newcode221 third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc:221: LazyNow* lazy_now, On ...
4 years ago (2016-12-14 16:50:36 UTC) #18
haraken
LGTM
4 years ago (2016-12-15 00:02:31 UTC) #23
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/2572893002/60001
4 years ago (2016-12-15 17:27:41 UTC) #26
commit-bot: I haz the power
Failed to apply patch for third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc: While running git apply --index -p1; error: patch failed: ...
4 years ago (2016-12-15 19:42:05 UTC) #28
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/2572893002/80001
4 years ago (2016-12-15 20:54:29 UTC) #31
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years ago (2016-12-16 00:07:04 UTC) #34
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/cab9842ac55e5b9dab766f11c6e412949d854483 Cr-Commit-Position: refs/heads/master@{#438962}
4 years ago (2016-12-16 00:10:31 UTC) #36
gab
A revert of this CL (patchset #5 id:80001) has been created in https://codereview.chromium.org/2583333002/ by gab@chromium.org. ...
4 years ago (2016-12-19 19:44:09 UTC) #37
alex clarke (OOO till 29th)
Sami PTAL
3 years, 10 months ago (2017-01-27 11:21:39 UTC) #41
Sami
https://codereview.chromium.org/2572893002/diff/100001/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.h File third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.h (right): https://codereview.chromium.org/2572893002/diff/100001/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.h#newcode82 third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.h:82: void CancelDelayedWork(base::TimeTicks run_time); What if one time domain accidentally ...
3 years, 10 months ago (2017-01-27 12:36:25 UTC) #44
alex clarke (OOO till 29th)
PTAL https://codereview.chromium.org/2572893002/diff/100001/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.h File third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.h (right): https://codereview.chromium.org/2572893002/diff/100001/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.h#newcode82 third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.h:82: void CancelDelayedWork(base::TimeTicks run_time); On 2017/01/27 12:36:25, Sami wrote: ...
3 years, 10 months ago (2017-01-30 18:24:01 UTC) #45
Sami
lgtm with a few comments. https://codereview.chromium.org/2572893002/diff/120001/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc File third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc (right): https://codereview.chromium.org/2572893002/diff/120001/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc#newcode236 third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc:236: DCHECK(main_thread_checker_.CalledOnValidThread()); DCHECK(!next_delayed_do_work_ || next_delayed_do_work_.time_domain() ...
3 years, 10 months ago (2017-02-01 07:30:05 UTC) #54
alex clarke (OOO till 29th)
Thanks! https://codereview.chromium.org/2572893002/diff/120001/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc File third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc (right): https://codereview.chromium.org/2572893002/diff/120001/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc#newcode236 third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc:236: DCHECK(main_thread_checker_.CalledOnValidThread()); On 2017/02/01 07:30:05, Sami (slow -- travelling) ...
3 years, 10 months ago (2017-02-01 14:50:11 UTC) #55
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/2572893002/140001
3 years, 10 months ago (2017-02-01 14:50:26 UTC) #58
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/379787)
3 years, 10 months ago (2017-02-01 16:08:21 UTC) #60
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/2572893002/160001
3 years, 10 months ago (2017-02-01 17:50:41 UTC) #63
commit-bot: I haz the power
Committed patchset #9 (id:160001) as https://chromium.googlesource.com/chromium/src/+/9a8a61516e750796f74869167bb919a05551d4dd
3 years, 10 months ago (2017-02-01 20:15:52 UTC) #66
alex clarke (OOO till 29th)
A revert of this CL (patchset #9 id:160001) has been created in https://codereview.chromium.org/2674903003/ by alexclarke@chromium.org. ...
3 years, 10 months ago (2017-02-03 17:51:15 UTC) #67
alex clarke (OOO till 29th)
I believe I've fixed the renderer hangs. PTAL.
3 years, 10 months ago (2017-02-10 11:02:04 UTC) #75
haraken
LGTM
3 years, 10 months ago (2017-02-10 12:04:55 UTC) #79
Sami
Thanks for the fix! Could you expand a bit in the patch description *why* GetNextScheduledWakeUp ...
3 years, 10 months ago (2017-02-10 12:49:43 UTC) #81
altimin
Is it a good idea to add comment to NextScheduledWakeUp method instead of a patch ...
3 years, 10 months ago (2017-02-10 13:05:32 UTC) #85
alex clarke (OOO till 29th)
PTAL https://codereview.chromium.org/2572893002/diff/220001/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc File third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc (right): https://codereview.chromium.org/2572893002/diff/220001/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc#newcode410 third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc:410: if (main_thread_only().delayed_incoming_queue.empty() || !IsQueueEnabled()) On 2017/02/10 12:49:43, Sami ...
3 years, 10 months ago (2017-02-10 14:19:29 UTC) #86
altimin
lgtm
3 years, 10 months ago (2017-02-10 14:22:54 UTC) #89
Sami
lgtm.
3 years, 10 months ago (2017-02-10 14:53:19 UTC) #90
alex clarke (OOO till 29th)
The try job for v8.mobile_infinite_scroll-turbo_tbmv2 passed, so hopefully it's not safe to re-land this patch ...
3 years, 10 months ago (2017-02-15 11:20:08 UTC) #101
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/2572893002/260001
3 years, 10 months ago (2017-02-15 11:21:12 UTC) #105
alex clarke (OOO till 29th)
On 2017/02/15 11:20:08, alex clarke wrote: > The try job for v8.mobile_infinite_scroll-turbo_tbmv2 passed, so hopefully ...
3 years, 10 months ago (2017-02-15 11:22:58 UTC) #106
alex clarke (OOO till 29th)
On 2017/02/15 11:20:08, alex clarke wrote: > The try job for v8.mobile_infinite_scroll-turbo_tbmv2 passed, so hopefully ...
3 years, 10 months ago (2017-02-15 11:23:02 UTC) #107
commit-bot: I haz the power
Committed patchset #14 (id:260001) as https://chromium.googlesource.com/chromium/src/+/c4b071b9088980c941d3dea85478b10675a479e6
3 years, 10 months ago (2017-02-15 13:14:39 UTC) #110
alex clarke (OOO till 29th)
A revert of this CL (patchset #14 id:260001) has been created in https://codereview.chromium.org/2705703002/ by alexclarke@chromium.org. ...
3 years, 10 months ago (2017-02-17 21:42:56 UTC) #112
altimin
On 2017/02/17 21:42:56, alex clarke wrote: > A revert of this CL (patchset #14 id:260001) ...
3 years, 10 months ago (2017-02-20 13:40:07 UTC) #115
Sami
SetTimeDomain fix lgtm, thanks!
3 years, 10 months ago (2017-02-20 13:55:34 UTC) #118
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/2572893002/300001
3 years, 10 months ago (2017-02-21 08:49:04 UTC) #125
commit-bot: I haz the power
3 years, 10 months ago (2017-02-21 08:55:22 UTC) #128
Message was sent while issue was closed.
Committed patchset #16 (id:300001) as
https://chromium.googlesource.com/chromium/src/+/2f16bd68bd7e191db66f96d2c761...

Powered by Google App Engine
This is Rietveld 408576698