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

Issue 2339633003: Reland of cc: Remove frame queuing from the scheduler. (Closed)

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

Description

Reland of cc: Remove frame queuing from the scheduler. (patchset #1 id:1 of https://codereview.chromium.org/2336493002/ ) Reason for revert: Reland after fixing screenshot grabber test and perf issues. Original issue's description: > Revert of cc: Remove frame queuing from the scheduler. (patchset #3 id:40001 of https://codereview.chromium.org/2323063004/ ) > > Reason for revert: > Broke ChromeScreenshotGrabberTest.TakeScreenshot on Linux ChromiumOS Tests (dbg)(1): https://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Tests%20%28dbg%29%281%29/builds/18015. > > Original issue's 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} > > TBR=enne@chromium.org,brianderson@chromium.org,danakj@chromium.org,sunnyps@chromium.org > # Not skipping CQ checks because original CL landed more than 1 days ago. > BUG=602485, 644992 > > Committed: https://crrev.com/95beb47e50065959ee2f5b43cf431431e32e14cd > Cr-Commit-Position: refs/heads/master@{#417895} TBR=enne@chromium.org,brianderson@chromium.org,danakj@chromium.org,sammc@chromium.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=602485, 644992 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel Committed: https://crrev.com/864a70f6f93a87ff374bf2aea2494d4d7d0150d7 Cr-Commit-Position: refs/heads/master@{#421268}

Patch Set 1 #

Patch Set 2 : Do not commit before display draws. #

Patch Set 3 : fix use of begin frame args after cancelling missed begin frame task #

Patch Set 4 : expire missed frames in renderer only #

Total comments: 6

Patch Set 5 : rebase #

Patch Set 6 : address comments #

Patch Set 7 : destroy scheduler in STP before output surface #

Patch Set 8 : make CFS not send swap ack in DetachFromClient #

Patch Set 9 : remove capture post tasks from STP::Stop #

Patch Set 10 : remove unnecessary Scheduler::DidLoseCFS call when shutting down compositor #

Patch Set 11 : rebase #

Patch Set 12 : post swap ack from CFS in fresh call stack #

Total comments: 2

Patch Set 13 : delay begin main frame until swap ack in browser compositor #

Total comments: 4

Patch Set 14 : prevent draw if commit is pending #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+197 lines, -656 lines) Patch
M cc/scheduler/scheduler.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +1 line, -5 lines 0 comments Download
M cc/scheduler/scheduler.cc View 1 2 3 4 5 6 7 8 9 10 10 chunks +66 lines, -124 lines 0 comments Download
M cc/scheduler/scheduler_state_machine.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +3 lines, -2 lines 0 comments Download
M cc/scheduler/scheduler_state_machine.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 13 chunks +41 lines, -40 lines 1 comment Download
M cc/scheduler/scheduler_state_machine_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +47 lines, -52 lines 0 comments Download
M cc/scheduler/scheduler_unittest.cc View 1 2 3 4 5 6 7 8 9 10 7 chunks +23 lines, -400 lines 0 comments Download
M cc/surfaces/direct_compositor_frame_sink.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -3 lines 0 comments Download
M cc/surfaces/display.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +4 lines, -3 lines 0 comments Download
M cc/test/scheduler_test_common.h View 1 2 chunks +4 lines, -5 lines 0 comments Download
M cc/test/test_compositor_frame_sink.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +1 line, -3 lines 0 comments Download
M cc/test/test_compositor_frame_sink.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +4 lines, -13 lines 0 comments Download
M cc/trees/proxy_impl.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -2 lines 0 comments Download
M cc/trees/single_thread_proxy.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -4 lines 0 comments Download

Messages

Total messages: 59 (34 generated)
sunnyps
Created Reland of cc: Remove frame queuing from the scheduler.
4 years, 3 months ago (2016-09-13 22:11:26 UTC) #1
sunnyps
PTAL The main changes are: 1. Do not commit in browser compositor before swap ack ...
4 years, 3 months ago (2016-09-19 21:38:46 UTC) #3
enne (OOO)
lgtm Sorry for the belated review. I didn't realize you wanted more reviewing. :) https://codereview.chromium.org/2339633003/diff/200001/cc/surfaces/display.cc ...
4 years, 3 months ago (2016-09-19 22:11:50 UTC) #4
brianderson
https://codereview.chromium.org/2339633003/diff/200001/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/2339633003/diff/200001/cc/scheduler/scheduler.cc#newcode275 cc/scheduler/scheduler.cc:275: if (!state_machine_.BeginFrameNeeded()) { This block of code may cause ...
4 years, 3 months ago (2016-09-19 22:56:44 UTC) #5
sunnyps
PTAL The screenshot test was still flaky but due to a DCHECK this time (vs ...
4 years, 3 months ago (2016-09-19 23:59:04 UTC) #6
danakj
On Mon, Sep 19, 2016 at 4:59 PM, <sunnyps@chromium.org> wrote: > PTAL > > The ...
4 years, 3 months ago (2016-09-20 00:02:35 UTC) #7
sunnyps
PTAL After some testing I also found that layer tree tests also perform actions in ...
4 years, 3 months ago (2016-09-21 00:10:56 UTC) #18
sunnyps
PTAL Sigh... running commit inside the same stack frame as Display::DrawAndSwap does not seem to ...
4 years, 3 months ago (2016-09-21 02:17:38 UTC) #25
enne (OOO)
The number of patches in this code review also make me nervous that this shutdown ...
4 years, 3 months ago (2016-09-21 17:38:55 UTC) #30
sunnyps
On 2016/09/21 17:38:55, enne wrote: > The number of patches in this code review also ...
4 years, 3 months ago (2016-09-22 03:50:17 UTC) #33
enne (OOO)
It is definitely the case that in SingleThreadProxy, BeginMainFrame and Commit should happen in the ...
4 years, 3 months ago (2016-09-22 19:01:48 UTC) #36
sunnyps
On 2016/09/22 19:01:48, enne wrote: > It is definitely the case that in SingleThreadProxy, BeginMainFrame ...
4 years, 3 months ago (2016-09-24 00:58:32 UTC) #39
sunnyps
On 2016/09/22 19:01:48, enne wrote: > It is definitely the case that in SingleThreadProxy, BeginMainFrame ...
4 years, 3 months ago (2016-09-24 00:58:32 UTC) #40
sunnyps
I'll ask for a review once the tests pass. Some tests were failing on the ...
4 years, 3 months ago (2016-09-24 01:15:02 UTC) #41
sunnyps
Woo hoo passed the CQ this time PTAL
4 years, 3 months ago (2016-09-24 01:54:41 UTC) #44
enne (OOO)
Thanks for wrangling this. :) > So I tried the next best thing, restrict impl-side ...
4 years, 2 months ago (2016-09-26 17:22:37 UTC) #45
brianderson
lgtm https://codereview.chromium.org/2339633003/diff/400001/cc/scheduler/scheduler_state_machine.cc File cc/scheduler/scheduler_state_machine.cc (left): https://codereview.chromium.org/2339633003/diff/400001/cc/scheduler/scheduler_state_machine.cc#oldcode126 cc/scheduler/scheduler_state_machine.cc:126: case BEGIN_MAIN_FRAME_STATE_WAITING_FOR_ACTIVATION: Nice way to remove these states.
4 years, 2 months ago (2016-09-26 23:10:28 UTC) #46
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/2339633003/400001
4 years, 2 months ago (2016-09-26 23:12:02 UTC) #48
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/284619)
4 years, 2 months ago (2016-09-27 00:20:45 UTC) #50
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/2339633003/400001
4 years, 2 months ago (2016-09-27 17:35:46 UTC) #52
commit-bot: I haz the power
Committed patchset #14 (id:400001)
4 years, 2 months ago (2016-09-27 18:10:52 UTC) #54
commit-bot: I haz the power
Patchset 14 (id:??) landed as https://crrev.com/864a70f6f93a87ff374bf2aea2494d4d7d0150d7 Cr-Commit-Position: refs/heads/master@{#421268}
4 years, 2 months ago (2016-09-27 18:17:18 UTC) #56
brianderson
A revert of this CL (patchset #14 id:400001) has been created in https://codereview.chromium.org/2379343003/ by brianderson@chromium.org. ...
4 years, 2 months ago (2016-09-30 23:44:38 UTC) #57
sunnyps
On 2016/09/30 23:44:38, brianderson wrote: > A revert of this CL (patchset #14 id:400001) has ...
4 years, 2 months ago (2016-10-03 20:27:35 UTC) #58
sunnyps
4 years, 2 months ago (2016-10-03 20:27:36 UTC) #59
Message was sent while issue was closed.
On 2016/09/30 23:44:38, brianderson wrote:
> A revert of this CL (patchset #14 id:400001) has been created in
> https://codereview.chromium.org/2379343003/ by
mailto:brianderson@chromium.org.
> 
> The reason for reverting is: Highly likely that this is causing the flakes we
> are seeing in http://crbug.com/645736.

New revert here: https://codereview.chromium.org/2386183003

Powered by Google App Engine
This is Rietveld 408576698