New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 613520 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocked on:
issue 613518



Sign in to add a comment

Detect and communicate RAIL mode

Project Member Reported by skyos...@chromium.org, May 20 2016

Issue description

We should detect the current RAIL mode the system is in and communicate that to clients such as v8.

Design doc: https://docs.google.com/document/d/1bRVAP08qNBvnEm_vO4hW1-NqQC9-lQZjUH29_vwfYRY/edit?pref=2&pli=1#
 
Blockedon: 613518
Project Member

Comment 2 by bugdroid1@chromium.org, Jun 29 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a37c2a7427da99593f9358d18861b4d2343bcde2

commit a37c2a7427da99593f9358d18861b4d2343bcde2
Author: skyostil <skyostil@chromium.org>
Date: Wed Jun 29 17:30:07 2016

scheduler: Tell v8 about the current RAIL mode

This patch makes the Blink scheduler tell v8 about the current estimated
RAIL mode. This will allow v8 to choose different optimization
strategies based on what the user is doing. This patch implements
the default, response, animation and idle modes. A future patch will
add support for the load mode.

BUG= 613520 

Review-Url: https://codereview.chromium.org/2093983002
Cr-Commit-Position: refs/heads/master@{#402852}

[modify] https://crrev.com/a37c2a7427da99593f9358d18861b4d2343bcde2/components/contextual_search.gypi
[modify] https://crrev.com/a37c2a7427da99593f9358d18861b4d2343bcde2/components/scheduler/renderer/DEPS
[modify] https://crrev.com/a37c2a7427da99593f9358d18861b4d2343bcde2/components/scheduler/renderer/renderer_scheduler.cc
[modify] https://crrev.com/a37c2a7427da99593f9358d18861b4d2343bcde2/components/scheduler/renderer/renderer_scheduler.h
[modify] https://crrev.com/a37c2a7427da99593f9358d18861b4d2343bcde2/components/scheduler/renderer/renderer_scheduler_impl.cc
[modify] https://crrev.com/a37c2a7427da99593f9358d18861b4d2343bcde2/components/scheduler/renderer/renderer_scheduler_impl.h
[modify] https://crrev.com/a37c2a7427da99593f9358d18861b4d2343bcde2/components/scheduler/renderer/renderer_scheduler_impl_unittest.cc
[modify] https://crrev.com/a37c2a7427da99593f9358d18861b4d2343bcde2/content/content_utility.gypi
[modify] https://crrev.com/a37c2a7427da99593f9358d18861b4d2343bcde2/content/renderer/render_thread_impl.cc
[modify] https://crrev.com/a37c2a7427da99593f9358d18861b4d2343bcde2/content/renderer/render_thread_impl.h
[modify] https://crrev.com/a37c2a7427da99593f9358d18861b4d2343bcde2/content/test/fake_renderer_scheduler.cc
[modify] https://crrev.com/a37c2a7427da99593f9358d18861b4d2343bcde2/content/test/fake_renderer_scheduler.h
[modify] https://crrev.com/a37c2a7427da99593f9358d18861b4d2343bcde2/third_party/WebKit/Source/core/workers/WorkerBackingThread.cpp
[modify] https://crrev.com/a37c2a7427da99593f9358d18861b4d2343bcde2/third_party/WebKit/Source/core/workers/WorkerBackingThread.h
[modify] https://crrev.com/a37c2a7427da99593f9358d18861b4d2343bcde2/third_party/WebKit/Source/web/WebKit.cpp
[modify] https://crrev.com/a37c2a7427da99593f9358d18861b4d2343bcde2/third_party/WebKit/public/web/WebKit.h

Comment 3 by u...@chromium.org, Oct 6 2016

Cc: hpayer@chromium.org u...@chromium.org skyos...@chromium.org
Sami, are there plans to add support for the load mode?
I'm kind of waiting for the conclusion for the first meaningful paint / first contentful paint metric study: https://docs.google.com/document/d/1neI5rEdg13RF1FJ1SssBVYV2NWr_kaEvPh_IaoxR6eg/edit#

One problem at the moment is that a high percentage of pages never make it to FCP. Would it be bad if we were stuck in loading mode for arbitrarily long?
s/FCP/FMP/

Comment 6 by u...@chromium.org, Oct 6 2016

> Would it be bad if we were stuck in loading mode for arbitrarily long?
I think we can work around that in V8, i.e. add mechanism that ensures that we finish GC even after some time even in load mode.
Well in that case I may have a patch for you to experiment with here: https://codereview.chromium.org/2397753006/

Comment 8 by u...@chromium.org, Oct 6 2016

That was super fast! Thanks a lot. :)

Comment 9 by u...@chromium.org, Oct 6 2016

The patch is working well for me locally.
Project Member

Comment 10 by bugdroid1@chromium.org, Dec 1 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e5da9cc2e06c351293a55b4f3c3fc9d39f1e2bfc

commit e5da9cc2e06c351293a55b4f3c3fc9d39f1e2bfc
Author: skyostil <skyostil@chromium.org>
Date: Thu Dec 01 15:36:43 2016

scheduler: Detect load RAIL mode

This patch implements detection for the loading RAIL mode. This mode
starts when the top-level frame navigates and lasts until we see the
first meaningful paint for the top-level frame (which is currently not
guaranteed to happen on all pages).

We don't currently use this state for scheduling but only pass the
information to v8 which can use it to adjust garbage collection
policies.

As a safeguard against cases where FMP is not detected, we terminate the
load stage if we see user input. The assumption is that if the user is interacting
with the page, there is likely meaningful content on the screen at that point.

BUG= 613520 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Review-Url: https://codereview.chromium.org/2397753006
Cr-Commit-Position: refs/heads/master@{#435616}

[modify] https://crrev.com/e5da9cc2e06c351293a55b4f3c3fc9d39f1e2bfc/third_party/WebKit/Source/core/paint/FirstMeaningfulPaintDetector.cpp
[modify] https://crrev.com/e5da9cc2e06c351293a55b4f3c3fc9d39f1e2bfc/third_party/WebKit/Source/core/paint/FirstMeaningfulPaintDetector.h
[modify] https://crrev.com/e5da9cc2e06c351293a55b4f3c3fc9d39f1e2bfc/third_party/WebKit/Source/core/paint/FirstMeaningfulPaintDetectorTest.cpp
[modify] https://crrev.com/e5da9cc2e06c351293a55b4f3c3fc9d39f1e2bfc/third_party/WebKit/Source/core/paint/PaintTiming.cpp
[modify] https://crrev.com/e5da9cc2e06c351293a55b4f3c3fc9d39f1e2bfc/third_party/WebKit/Source/core/paint/PaintTiming.h
[modify] https://crrev.com/e5da9cc2e06c351293a55b4f3c3fc9d39f1e2bfc/third_party/WebKit/Source/platform/scheduler/child/web_scheduler_impl.h
[modify] https://crrev.com/e5da9cc2e06c351293a55b4f3c3fc9d39f1e2bfc/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc
[modify] https://crrev.com/e5da9cc2e06c351293a55b4f3c3fc9d39f1e2bfc/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.h
[modify] https://crrev.com/e5da9cc2e06c351293a55b4f3c3fc9d39f1e2bfc/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl_unittest.cc
[modify] https://crrev.com/e5da9cc2e06c351293a55b4f3c3fc9d39f1e2bfc/third_party/WebKit/Source/platform/scheduler/renderer/renderer_web_scheduler_impl.cc
[modify] https://crrev.com/e5da9cc2e06c351293a55b4f3c3fc9d39f1e2bfc/third_party/WebKit/Source/platform/scheduler/renderer/renderer_web_scheduler_impl.h
[modify] https://crrev.com/e5da9cc2e06c351293a55b4f3c3fc9d39f1e2bfc/third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl.cc
[modify] https://crrev.com/e5da9cc2e06c351293a55b4f3c3fc9d39f1e2bfc/third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl.h
[modify] https://crrev.com/e5da9cc2e06c351293a55b4f3c3fc9d39f1e2bfc/third_party/WebKit/Source/platform/testing/TestingPlatformSupport.h
[modify] https://crrev.com/e5da9cc2e06c351293a55b4f3c3fc9d39f1e2bfc/third_party/WebKit/public/platform/WebFrameScheduler.h
[modify] https://crrev.com/e5da9cc2e06c351293a55b4f3c3fc9d39f1e2bfc/third_party/WebKit/public/platform/WebScheduler.h

Owner: skyos...@chromium.org
Status: Fixed (was: Untriaged)
This should be working now. If you see cases where L is being triggered incorrectly, please file a bug.

Comment 12 by u...@chromium.org, Dec 1 2016

Yay! Thank you, Sami! :)

Sign in to add a comment