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

Issue 2323063004: cc: Remove frame queuing from the scheduler. (Closed)

Created:
4 years, 3 months ago by sunnyps
Modified:
4 years, 3 months ago
CC:
cc-bugs_chromium.org, chromium-reviews, scheduler-bugs_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

cc: Remove frame queuing from the scheduler. CC scheduler has a frame queuing mechanism called "retro frames". This has been responsible for a lot of complexity and hard to fix bugs. The original intent for adding retro frames was to allow the scheduler to handle multiple frames in flight but that goal doesn't seem feasible or even desirable any more. This CL removes the retro frames queue and instead makes the Scheduler end the previous frame when it receives a BeginFrame message. One surprising behavior was that SyntheticBFS MISSED frames would be queued as retro frames and this would convert the synchronous begin frame call (inside Scheduler::ProcessScheduledActions) to an asynchronous retro frame PostTask. To work around this the Scheduler keeps track of a single CancelableClosure that's used for MISSED frames. The above behavior was also causing the BeginFramesNotFromClient tests to work even though there was an extra MISSED frame in the queue. This is more elegantly solved in another way by using frame number to advance the task runner instead of just running pending tasks. Lastly SchedulerStateMachine is modified so that it's possible to end the previous frame and still have the same behavior as before in the commit to active tree (browser compositor) mode. R=brianderson@chromium.org,enne@chromium.org,danakj@chromium.org BUG=602485, 644992 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel Committed: https://crrev.com/559280b26cc5672f5f054e8ac35281e804c14d78 Cr-Commit-Position: refs/heads/master@{#417764}

Patch Set 1 #

Total comments: 11

Patch Set 2 : review #

Patch Set 3 : nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+122 lines, -555 lines) Patch
M cc/scheduler/scheduler.h View 3 chunks +1 line, -5 lines 0 comments Download
M cc/scheduler/scheduler.cc View 1 2 11 chunks +32 lines, -101 lines 0 comments Download
M cc/scheduler/scheduler_state_machine.h View 1 chunk +3 lines, -0 lines 0 comments Download
M cc/scheduler/scheduler_state_machine.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M cc/scheduler/scheduler_state_machine_unittest.cc View 3 chunks +56 lines, -39 lines 0 comments Download
M cc/scheduler/scheduler_unittest.cc View 7 chunks +23 lines, -405 lines 0 comments Download
M cc/test/scheduler_test_common.h View 2 chunks +4 lines, -5 lines 0 comments Download

Messages

Total messages: 20 (8 generated)
sunnyps
PTAL
4 years, 3 months ago (2016-09-09 02:26:06 UTC) #4
brianderson
https://codereview.chromium.org/2323063004/diff/1/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (left): https://codereview.chromium.org/2323063004/diff/1/cc/scheduler/scheduler.cc#oldcode727 cc/scheduler/scheduler.cc:727: state->SetBoolean("begin_retro_frame_task", Add a trace for the new missed task? ...
4 years, 3 months ago (2016-09-09 07:35:58 UTC) #7
enne (OOO)
https://codereview.chromium.org/2323063004/diff/1/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/2323063004/diff/1/cc/scheduler/scheduler.cc#newcode304 cc/scheduler/scheduler.cc:304: &Scheduler::BeginImplFrameWithDeadline, base::Unretained(this), args)); Why args and not adjusted_args? (Just ...
4 years, 3 months ago (2016-09-09 17:40:27 UTC) #8
sunnyps
Addressed all comments. PTAL. https://codereview.chromium.org/2323063004/diff/1/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (left): https://codereview.chromium.org/2323063004/diff/1/cc/scheduler/scheduler.cc#oldcode727 cc/scheduler/scheduler.cc:727: state->SetBoolean("begin_retro_frame_task", On 2016/09/09 07:35:58, brianderson ...
4 years, 3 months ago (2016-09-09 21:21:54 UTC) #9
enne (OOO)
lgtm % brianderson Glad to finally see retro frames go away, and excited to see ...
4 years, 3 months ago (2016-09-09 21:56:27 UTC) #10
brianderson
4 years, 3 months ago (2016-09-09 22:20:22 UTC) #11
brianderson
lgtm https://codereview.chromium.org/2323063004/diff/1/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/2323063004/diff/1/cc/scheduler/scheduler.cc#newcode343 cc/scheduler/scheduler.cc:343: SchedulerStateMachine::BEGIN_IMPL_FRAME_STATE_IDLE) { On 2016/09/09 07:35:58, brianderson wrote: > ...
4 years, 3 months ago (2016-09-09 22:25:37 UTC) #12
sunnyps
Thanks! https://codereview.chromium.org/2323063004/diff/1/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/2323063004/diff/1/cc/scheduler/scheduler.cc#newcode343 cc/scheduler/scheduler.cc:343: SchedulerStateMachine::BEGIN_IMPL_FRAME_STATE_IDLE) { On 2016/09/09 22:25:37, brianderson wrote: > ...
4 years, 3 months ago (2016-09-09 22:35:42 UTC) #15
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/2323063004/40001
4 years, 3 months ago (2016-09-09 22:35:42 UTC) #16
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 3 months ago (2016-09-09 23:34:58 UTC) #17
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/559280b26cc5672f5f054e8ac35281e804c14d78 Cr-Commit-Position: refs/heads/master@{#417764}
4 years, 3 months ago (2016-09-09 23:38:58 UTC) #19
Sam McNally
4 years, 3 months ago (2016-09-12 07:46:47 UTC) #20
Message was sent while issue was closed.
A revert of this CL (patchset #3 id:40001) has been created in
https://codereview.chromium.org/2336493002/ by sammc@chromium.org.

The reason for reverting is: Broke ChromeScreenshotGrabberTest.TakeScreenshot on
 Linux ChromiumOS Tests (dbg)(1):
https://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%....

Powered by Google App Engine
This is Rietveld 408576698