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

Issue 2017763003: Suspend more task queues for background renderers (experimental) (Closed)

Created:
4 years, 6 months ago by hajimehoshi
Modified:
4 years, 2 months ago
CC:
chromium-reviews, scheduler-bugs_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Suspend more task queues for background renderers (experimental) Backgrounded-tab suspending was introduced at crrev/1914143002, where only the timer task queue was suspended. We knew this was not enough and we need to suspend more task queues to prevent the return of purged cache. This CL adds the feature to suspend these task queues besides timer task queues when backgrounded-tab suspending starts: * default_loading_tq * frame_loading_tq The above task queues might call V8 functions, which means any purged cache can be reverted. This CL doesn't suspend "default_tq" (which we can't suspend since this conveys critial tasks) and "idle_tq" (which I think is not harmful for purged caches), "control_(after_wakeup_)tq" (which is only for internal scheduler housekeeping tasks) and "compositor_tq" (which is not used when the renderer is backgrounded). BUG=607077 TEST=n/a Committed: https://crrev.com/e9897950a1574e0842dc86e0c50e6695773edf41 Cr-Commit-Position: refs/heads/master@{#397990}

Patch Set 1 : #

Total comments: 2

Patch Set 2 : Address Sami's review #

Total comments: 2

Patch Set 3 : Address on Sami's review #

Patch Set 4 : Fix tests #

Patch Set 5 : Rebasing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -6 lines) Patch
M components/scheduler/renderer/renderer_scheduler_impl.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M components/scheduler/renderer/renderer_scheduler_impl.cc View 1 2 3 4 4 chunks +8 lines, -0 lines 0 comments Download
M components/scheduler/renderer/renderer_scheduler_impl_unittest.cc View 1 2 3 4 1 chunk +10 lines, -6 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 21 (7 generated)
hajimehoshi
4 years, 6 months ago (2016-05-27 09:33:44 UTC) #3
hajimehoshi
Sami: I'm not confident with suspending control(_after_wakeup)_tq. Is this OK? PTAL
4 years, 6 months ago (2016-05-27 09:34:24 UTC) #4
Sami
I think we can avoid suspending any of the control task queues, because those are ...
4 years, 6 months ago (2016-05-27 14:08:57 UTC) #6
hajimehoshi
Thank you! I also fixed not to suspend controller_*_tq and compositor_tq. https://codereview.chromium.org/2017763003/diff/20001/components/scheduler/renderer/renderer_scheduler_impl.h File components/scheduler/renderer/renderer_scheduler_impl.h (right): ...
4 years, 6 months ago (2016-05-31 08:09:01 UTC) #8
Sami
https://codereview.chromium.org/2017763003/diff/40001/components/scheduler/renderer/renderer_scheduler_impl.cc File components/scheduler/renderer/renderer_scheduler_impl.cc (right): https://codereview.chromium.org/2017763003/diff/40001/components/scheduler/renderer/renderer_scheduler_impl.cc#newcode1223 components/scheduler/renderer/renderer_scheduler_impl.cc:1223: MainThreadOnly().renderer_suspended = true; I guess this is just for ...
4 years, 6 months ago (2016-05-31 10:11:22 UTC) #9
hajimehoshi
https://codereview.chromium.org/2017763003/diff/40001/components/scheduler/renderer/renderer_scheduler_impl.cc File components/scheduler/renderer/renderer_scheduler_impl.cc (right): https://codereview.chromium.org/2017763003/diff/40001/components/scheduler/renderer/renderer_scheduler_impl.cc#newcode1223 components/scheduler/renderer/renderer_scheduler_impl.cc:1223: MainThreadOnly().renderer_suspended = true; On 2016/05/31 10:11:21, Sami wrote: > ...
4 years, 6 months ago (2016-05-31 11:10:07 UTC) #10
Sami
Thanks, looks great. Please add a test if you want to land this for real.
4 years, 6 months ago (2016-05-31 14:21:03 UTC) #11
hajimehoshi
On 2016/05/31 14:21:03, Sami wrote: > Thanks, looks great. Please add a test if you ...
4 years, 6 months ago (2016-06-02 09:12:37 UTC) #12
Sami
Thanks, lgtm.
4 years, 6 months ago (2016-06-03 15:59:06 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2017763003/100001
4 years, 6 months ago (2016-06-06 04:49:30 UTC) #15
commit-bot: I haz the power
Committed patchset #5 (id:100001)
4 years, 6 months ago (2016-06-06 07:37:00 UTC) #17
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/e9897950a1574e0842dc86e0c50e6695773edf41 Cr-Commit-Position: refs/heads/master@{#397990}
4 years, 6 months ago (2016-06-06 07:38:42 UTC) #19
haraken
Sami: I'm just curious, but does this CL suspend not only the default timer & ...
4 years, 2 months ago (2016-10-07 06:34:39 UTC) #20
Sami
4 years, 2 months ago (2016-10-07 10:04:15 UTC) #21
Message was sent while issue was closed.
On 2016/10/07 06:34:39, haraken wrote:
> Sami: I'm just curious, but does this CL suspend not only the default timer &
> loading task runners but also per-frame timer & loading task runners?

Yes, see these loops here where the policies are applied to all task queues of
the respective type:

https://cs.chromium.org/chromium/src/third_party/WebKit/Source/platform/sched...

Powered by Google App Engine
This is Rietveld 408576698