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

Issue 2418593002: Fix scheduler bug in skipping main frames (Closed)

Created:
4 years, 2 months ago by enne (OOO)
Modified:
4 years, 2 months ago
Reviewers:
sunnyps, brianderson
CC:
brianderson, cc-bugs_chromium.org, chromium-reviews, danakj, scheduler-bugs_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix scheduler bug in skipping main frames Previously the scheduler would think that it could skip a main frame if the begin frame's start time + estimated time < deadline. However, if this begin frame gets delivered very late, then this is incorrect, and it's even possible that start time + estimated time < Now() and is in the past, which doesn't make sense. Instead, check if Now() + estimated time < deadline. This is the right logic to see if it's possible to finish activation from the current moment before the deadline. This was causing problems where the following events would occur: - browser has a 40ms draw - browser delivers a begin frame - renderer mistakenly thinks the activation fits below the deadline even though estimated time > one frame - renderer skips this begin main frame - browser has another 40ms draw - renderer now does a begin main frame, >40ms late This was causing tab capture performance tests where the browser was pegged with long draw operations to cause the renderer frame times to go from 60 to 100ms. R=sunnyps@chromium.org BUG=632292 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel Committed: https://crrev.com/ff408189176e09e6c8160cc3ac6d44bc9846ebef Cr-Commit-Position: refs/heads/master@{#425449}

Patch Set 1 #

Total comments: 10

Patch Set 2 : Address review comments #

Patch Set 3 : Rename expected draw function after danakj changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+44 lines, -9 lines) Patch
M cc/scheduler/scheduler.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M cc/scheduler/scheduler.cc View 1 2 3 chunks +7 lines, -5 lines 0 comments Download
M cc/scheduler/scheduler_unittest.cc View 1 2 4 chunks +35 lines, -3 lines 0 comments Download

Messages

Total messages: 30 (17 generated)
enne (OOO)
4 years, 2 months ago (2016-10-12 20:00:20 UTC) #3
brianderson
https://codereview.chromium.org/2418593002/diff/1/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/2418593002/diff/1/cc/scheduler/scheduler.cc#newcode322 cc/scheduler/scheduler.cc:322: Now() > adjusted_args.deadline) { Would it work to store ...
4 years, 2 months ago (2016-10-12 20:38:17 UTC) #7
sunnyps
https://codereview.chromium.org/2418593002/diff/1/cc/scheduler/scheduler_unittest.cc File cc/scheduler/scheduler_unittest.cc (right): https://codereview.chromium.org/2418593002/diff/1/cc/scheduler/scheduler_unittest.cc#newcode1331 cc/scheduler/scheduler_unittest.cc:1331: // Advance frame and create a begin frame. Why ...
4 years, 2 months ago (2016-10-12 20:51:46 UTC) #8
enne (OOO)
https://codereview.chromium.org/2418593002/diff/1/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/2418593002/diff/1/cc/scheduler/scheduler.cc#newcode322 cc/scheduler/scheduler.cc:322: Now() > adjusted_args.deadline) { On 2016/10/12 at 20:38:17, brianderson ...
4 years, 2 months ago (2016-10-13 17:09:44 UTC) #12
sunnyps
lgtm https://codereview.chromium.org/2418593002/diff/1/cc/scheduler/scheduler_unittest.cc File cc/scheduler/scheduler_unittest.cc (right): https://codereview.chromium.org/2418593002/diff/1/cc/scheduler/scheduler_unittest.cc#newcode1331 cc/scheduler/scheduler_unittest.cc:1331: // Advance frame and create a begin frame. ...
4 years, 2 months ago (2016-10-13 20:25:57 UTC) #17
brianderson
lgtm too.
4 years, 2 months ago (2016-10-13 23:04:58 UTC) #18
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/2418593002/20001
4 years, 2 months ago (2016-10-14 17:51:49 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_swarming_rel/builds/48681)
4 years, 2 months ago (2016-10-14 18:37:54 UTC) #22
enne (OOO)
Hmm, looks like failures are of the form: [ RUN ] SchedulerTest.MainFrameNotSkippedAfterLateBeginFrame ../../cc/scheduler/scheduler_unittest.cc:1346: Failure Value ...
4 years, 2 months ago (2016-10-14 18:54:30 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/2418593002/40001
4 years, 2 months ago (2016-10-14 19:09:25 UTC) #26
enne (OOO)
On 2016/10/14 at 18:54:30, enne wrote: > Hmm, looks like failures are of the form: ...
4 years, 2 months ago (2016-10-14 19:10:15 UTC) #27
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 2 months ago (2016-10-14 20:15:44 UTC) #28
commit-bot: I haz the power
4 years, 2 months ago (2016-10-14 20:18:24 UTC) #30
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/ff408189176e09e6c8160cc3ac6d44bc9846ebef
Cr-Commit-Position: refs/heads/master@{#425449}

Powered by Google App Engine
This is Rietveld 408576698