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

Issue 926663002: Handle RenderProcessHostImpl::SetBackgrounded on Windows (Closed)

Created:
5 years, 10 months ago by gab
Modified:
5 years, 10 months ago
Reviewers:
jam, Will Harris
CC:
chromium-reviews, darin-cc_chromium.org, nasko+codewatch_chromium.org, creis+watch_chromium.org, cpu_(ooo_6.6-7.5), ananta, DaleCurtis
Base URL:
https://chromium.googlesource.com/chromium/src.git@908473002_ps2
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Handle RenderProcessHostImpl::SetBackgrounded on Windows This was disabled on Windows because: - http://crrev.com/274071 made it such that it was asynchronous via the renderer (as only the process itself can set itself in background mode on Windows). - And then this was removed for Windows as part of issue 381820 as true background mode on Windows was achieved by having the renderer itself change its process priority (which doesn't work as the unbackgrounding request can be stuck behind other priority tasks running in background mode). Also, the test for this was disabled in between (see issue 394368) -- the asynchronicity introduced in r274071 probably causing the flakes. Overall there is no need to have the renderer enter PROCESS_MODE_BACKGROUND_BEGIN itself, IDLE_PRIORITY_CLASS should be sufficient as its the same as far as CPU priority is concerned and IO is irrelevant in the renderers. Thus we can get background mode for hidden renderers without running into issue 381820. Experiment with IDLE_PRIORITY_CLASS/BELOW_NORMAL_PRIORITY_CLASS vs the status quo. Watching the relevant perf bots (tab_switching.top_10 -> MPArch.RWH_TabSwitchPaintDuration) and UMA metrics MPArch.RWH_TabSwitchPaintDuration which shouldn't regress. And others (e.g., SessionRestore related) which will hopefully improve. Enable the experiment by default in the absence of Finch to get perf waterfall coverage. The experiment will be called "BackgroundRendererProcesses" and have 4 groups: ["Disallow", "AllowBelowNormalFromBrowser", "AllowIdleFromBrowser", "AllowBackgroundModeFromRenderer"] It will be a per-session (rather than per-profile) experiment, randomly assigning a user to a group every new Chrome session. BUG=394368, 458594 Committed: https://crrev.com/aaf738a2cce69ce952386b48e3bc252bd307ef43 Cr-Commit-Position: refs/heads/master@{#317042} Committed: https://crrev.com/d88d22aba23050a743d2dbbad57527433d504df7 Cr-Commit-Position: refs/heads/master@{#317241}

Patch Set 1 #

Patch Set 2 : as an experiment #

Total comments: 2

Patch Set 3 : Add AllowBackgroundModeFromRenderer experiment group for regression testing #

Patch Set 4 : merge up to r316866 #

Patch Set 5 : Leave ChromeRenderProcessHostTest.Backgrounding disabled on Windows for now :-( #

Unified diffs Side-by-side diffs Delta from patch set Stats (+53 lines, -10 lines) Patch
M base/process/process_win.cc View 1 2 2 chunks +16 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 1 chunk +19 lines, -9 lines 0 comments Download
M content/child/child_thread_impl.cc View 1 2 3 4 2 chunks +18 lines, -0 lines 0 comments Download

Messages

Total messages: 55 (23 generated)
gab
Ananta, PTAL. Seems pretty straight forward, any reason not to do this?!
5 years, 10 months ago (2015-02-13 18:55:59 UTC) #2
gab
On 2015/02/13 18:55:59, gab wrote: > Ananta, PTAL. Seems pretty straight forward, any reason not ...
5 years, 10 months ago (2015-02-13 18:56:19 UTC) #3
DaleCurtis
The vista process backgrounding was removed for http://crbug.com/381820 -- +wfh who can confirm if the ...
5 years, 10 months ago (2015-02-13 19:24:06 UTC) #5
gab
On 2015/02/13 19:24:06, DaleCurtis wrote: > The vista process backgrounding was removed for http://crbug.com/381820 -- ...
5 years, 10 months ago (2015-02-13 23:24:54 UTC) #6
gab
Will please approve per discussion on http://crbug.com/458594. jam: PTAL as content/ owner. Thanks, Gab
5 years, 10 months ago (2015-02-17 21:26:53 UTC) #8
Will Harris
lgtm but please monitor the waterfalls. I'd almost like to see a test with PROCESS_MODE_BACKGROUND_BEGIN ...
5 years, 10 months ago (2015-02-17 21:40:15 UTC) #9
chromium-reviews
Interesting I could add an experiment bucket for calling SetProcessBackgrounded() from OnSetProcessBackgrounded() in the renderers ...
5 years, 10 months ago (2015-02-17 21:50:13 UTC) #10
jam
lgtm https://codereview.chromium.org/926663002/diff/20001/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (right): https://codereview.chromium.org/926663002/diff/20001/content/browser/renderer_host/render_process_host_impl.cc#newcode2220 content/browser/renderer_host/render_process_host_impl.cc:2220: // switfly scheduled by the OS per the ...
5 years, 10 months ago (2015-02-17 23:15:26 UTC) #11
Will Harris
One final nit/suggestion, could you add BUG=381820 to the CL as well? Then, in the ...
5 years, 10 months ago (2015-02-17 23:34:25 UTC) #12
gab
On 2015/02/17 23:34:25, Will Harris wrote: > One final nit/suggestion, could you add BUG=381820 to ...
5 years, 10 months ago (2015-02-18 01:01:50 UTC) #14
gab
Oh and forgot to post it, but nit addressed. @jam: PTAL (and let me know ...
5 years, 10 months ago (2015-02-18 14:42:22 UTC) #15
jam
lgtm no need for other reviewer
5 years, 10 months ago (2015-02-18 17:22:36 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/926663002/40001
5 years, 10 months ago (2015-02-18 17:52:54 UTC) #18
commit-bot: I haz the power
CQ experienced an internal error when committing your CL and the maintainers were notified. Sorry ...
5 years, 10 months ago (2015-02-18 17:55:47 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/926663002/40001
5 years, 10 months ago (2015-02-18 18:19:15 UTC) #23
commit-bot: I haz the power
CQ experienced an internal error when committing your CL and the maintainers were notified. Sorry ...
5 years, 10 months ago (2015-02-18 18:19:51 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/926663002/40001
5 years, 10 months ago (2015-02-18 18:59:26 UTC) #28
commit-bot: I haz the power
CQ experienced an internal error when committing your CL and the maintainers were notified. Sorry ...
5 years, 10 months ago (2015-02-18 19:00:06 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/926663002/40001
5 years, 10 months ago (2015-02-18 20:15:57 UTC) #33
commit-bot: I haz the power
CQ experienced an internal error when committing your CL and the maintainers were notified. Sorry ...
5 years, 10 months ago (2015-02-18 20:16:56 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/926663002/60001
5 years, 10 months ago (2015-02-18 20:23:54 UTC) #39
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/27744)
5 years, 10 months ago (2015-02-19 00:38:02 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/926663002/60001
5 years, 10 months ago (2015-02-19 00:44:32 UTC) #43
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/27918)
5 years, 10 months ago (2015-02-19 03:47:55 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/926663002/60001
5 years, 10 months ago (2015-02-19 13:30:17 UTC) #47
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 10 months ago (2015-02-19 14:20:08 UTC) #48
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/aaf738a2cce69ce952386b48e3bc252bd307ef43 Cr-Commit-Position: refs/heads/master@{#317042}
5 years, 10 months ago (2015-02-19 14:20:51 UTC) #49
Devlin
A revert of this CL (patchset #4 id:60001) has been created in https://codereview.chromium.org/940993002/ by rdevlin.cronin@chromium.org. ...
5 years, 10 months ago (2015-02-19 17:38:37 UTC) #50
gab
On 2015/02/19 17:38:37, Devlin wrote: > A revert of this CL (patchset #4 id:60001) has ...
5 years, 10 months ago (2015-02-20 03:28:46 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/926663002/80001
5 years, 10 months ago (2015-02-20 03:30:41 UTC) #53
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years, 10 months ago (2015-02-20 04:27:00 UTC) #54
commit-bot: I haz the power
5 years, 10 months ago (2015-02-20 04:27:45 UTC) #55
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/d88d22aba23050a743d2dbbad57527433d504df7
Cr-Commit-Position: refs/heads/master@{#317241}

Powered by Google App Engine
This is Rietveld 408576698