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

Issue 554973002: Disable scheduler deadline task on battery power in Windows (Closed)

Created:
6 years, 3 months ago by sunnyps
Modified:
6 years, 2 months ago
CC:
chromium-reviews, cc-bugs_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Disable scheduler deadline task on battery power in Windows On windows the timer resolution on battery power is quite low (15 ms). The scheduler should take this into account while posting it's deadline task - otherwise it risks giving way too much time to the main thread which means frame rate is reduced by half in the worst case. BUG=407182 Committed: https://crrev.com/34093979365b781fa6b9472ed8e4cdbfcef9a683 Cr-Commit-Position: refs/heads/master@{#299984}

Patch Set 1 #

Patch Set 2 : After rebase #

Total comments: 3

Patch Set 3 : With unit tests #

Patch Set 4 : Enable high_latency_mode_on_battery for Windows #

Patch Set 5 : Address code review nit #

Total comments: 12

Patch Set 6 : Address code review comments #

Patch Set 7 : Added better tests for mithro #

Total comments: 3

Patch Set 8 : Improve scheduler power observing design #

Patch Set 9 : Initialize on_battery_power_ bool #

Total comments: 6

Patch Set 10 : Address code review comments #

Patch Set 11 : Remove redundant != NULL #

Total comments: 10

Patch Set 12 : Address brianderson's and mithro's comments #

Total comments: 1

Patch Set 13 : Address Dana's comments #

Patch Set 14 : Rename flag #

Patch Set 15 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+273 lines, -25 lines) Patch
M cc/scheduler/scheduler.h View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +15 lines, -2 lines 0 comments Download
M cc/scheduler/scheduler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +26 lines, -0 lines 0 comments Download
M cc/scheduler/scheduler_settings.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M cc/scheduler/scheduler_settings.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +7 lines, -2 lines 0 comments Download
M cc/scheduler/scheduler_state_machine.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +7 lines, -0 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 14 3 chunks +9 lines, -1 line 0 comments Download
M cc/scheduler/scheduler_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 7 chunks +189 lines, -6 lines 0 comments Download
M cc/test/scheduler_test_common.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +7 lines, -10 lines 0 comments Download
M cc/test/scheduler_test_common.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_settings.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M cc/trees/layer_tree_settings.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M cc/trees/single_thread_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -1 line 0 comments Download
M cc/trees/thread_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -1 line 0 comments Download
M ui/compositor/compositor.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 44 (9 generated)
sunnyps
Can you take a look at this, Brian? I'm sure you're the owner for most ...
6 years, 3 months ago (2014-09-09 01:21:46 UTC) #2
danakj
Where's the tests?
6 years, 3 months ago (2014-09-09 14:59:55 UTC) #3
brianderson
As Dana already pointed out, you'll want to add unit tests to scheduler_unittests.cc for this. ...
6 years, 3 months ago (2014-09-09 17:59:05 UTC) #4
sunnyps
I've addressed the issues pointed out and added tests. Please take a look again.
6 years, 3 months ago (2014-09-12 19:34:32 UTC) #5
brianderson
https://codereview.chromium.org/554973002/diff/80001/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/554973002/diff/80001/cc/scheduler/scheduler.cc#newcode544 cc/scheduler/scheduler.cc:544: if (settings_.high_latency_mode_on_battery && on_battery_power_) Please add a comment above ...
6 years, 3 months ago (2014-09-12 22:05:28 UTC) #6
sunnyps
Addressed most of your comments, brianderson. bajones, can you please review the FakePowerMonitorSource code in ...
6 years, 3 months ago (2014-09-15 21:52:49 UTC) #8
bajones
On 2014/09/15 at 21:52:49, sunnyps wrote: > bajones, can you please review the FakePowerMonitorSource code ...
6 years, 3 months ago (2014-09-16 01:10:47 UTC) #9
sunnyps
https://codereview.chromium.org/554973002/diff/80001/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/554973002/diff/80001/cc/scheduler/scheduler.cc#newcode584 cc/scheduler/scheduler.cc:584: OnBeginImplFrameDeadline(); On 2014/09/15 21:52:48, sunnyps wrote: > On 2014/09/12 ...
6 years, 3 months ago (2014-09-16 21:30:31 UTC) #10
mithro-old
Hi sunnyps, Sami pointed me in the direction of this change. With the additions I ...
6 years, 3 months ago (2014-09-23 15:11:14 UTC) #11
sunnyps
On 2014/09/23 15:11:14, mithro wrote: > Hi sunnyps, > > Sami pointed me in the ...
6 years, 3 months ago (2014-09-24 18:34:59 UTC) #12
sunnyps
On 2014/09/24 18:34:59, sunnyps wrote: > On 2014/09/23 15:11:14, mithro wrote: > > Hi sunnyps, ...
6 years, 3 months ago (2014-09-24 18:42:01 UTC) #13
sunnyps
On 2014/09/23 15:11:14, mithro wrote: > Hi sunnyps, > > Sami pointed me in the ...
6 years, 2 months ago (2014-10-09 01:16:31 UTC) #14
sunnyps
danakj, can you please review the changes in compositor.cc and overall too if you're interested?
6 years, 2 months ago (2014-10-09 01:17:41 UTC) #16
danakj
LGTM https://codereview.chromium.org/554973002/diff/120001/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/554973002/diff/120001/cc/scheduler/scheduler.cc#newcode78 cc/scheduler/scheduler.cc:78: : frame_source_(), initialize your new bool to false ...
6 years, 2 months ago (2014-10-09 17:04:01 UTC) #17
sunnyps
I've fixed two issues with the latest patch set: 1. Improved the design of power ...
6 years, 2 months ago (2014-10-09 21:03:38 UTC) #18
sunnyps
I've fixed two issues with the latest patch set: 1. Improved the design of power ...
6 years, 2 months ago (2014-10-09 21:03:38 UTC) #19
sunnyps
On 2014/10/09 17:04:01, danakj wrote: > LGTM > > https://codereview.chromium.org/554973002/diff/120001/cc/scheduler/scheduler.cc > File cc/scheduler/scheduler.cc (right): > ...
6 years, 2 months ago (2014-10-09 21:07:42 UTC) #20
danakj
https://codereview.chromium.org/554973002/diff/250001/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/554973002/diff/250001/cc/scheduler/scheduler.cc#newcode140 cc/scheduler/scheduler.cc:140: power_monitor != NULL); != NULL is redundant here and ...
6 years, 2 months ago (2014-10-09 21:18:03 UTC) #21
danakj
Going through the client sounds like a good idea for tests.
6 years, 2 months ago (2014-10-09 21:18:18 UTC) #22
sunnyps
On 2014/10/09 21:18:03, danakj wrote: > https://codereview.chromium.org/554973002/diff/250001/cc/scheduler/scheduler.cc > File cc/scheduler/scheduler.cc (right): > > https://codereview.chromium.org/554973002/diff/250001/cc/scheduler/scheduler.cc#newcode140 > ...
6 years, 2 months ago (2014-10-09 22:04:28 UTC) #23
sunnyps
https://codereview.chromium.org/554973002/diff/250001/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/554973002/diff/250001/cc/scheduler/scheduler.cc#newcode140 cc/scheduler/scheduler.cc:140: power_monitor != NULL); On 2014/10/09 21:18:02, danakj wrote: > ...
6 years, 2 months ago (2014-10-09 22:04:39 UTC) #24
danakj
https://codereview.chromium.org/554973002/diff/250001/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/554973002/diff/250001/cc/scheduler/scheduler.cc#newcode140 cc/scheduler/scheduler.cc:140: power_monitor != NULL); On 2014/10/09 22:04:39, sunnyps wrote: > ...
6 years, 2 months ago (2014-10-09 22:08:27 UTC) #25
sunnyps
On 2014/10/09 22:08:27, danakj wrote: > Sorry, what I meant is if (a != NULL) ...
6 years, 2 months ago (2014-10-09 22:30:21 UTC) #26
mithro-old
https://codereview.chromium.org/554973002/diff/370001/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (left): https://codereview.chromium.org/554973002/diff/370001/cc/scheduler/scheduler.cc#oldcode520 cc/scheduler/scheduler.cc:520: // The synchronous compositor needs to draw right away. ...
6 years, 2 months ago (2014-10-13 23:25:58 UTC) #28
sunnyps
https://codereview.chromium.org/554973002/diff/370001/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (left): https://codereview.chromium.org/554973002/diff/370001/cc/scheduler/scheduler.cc#oldcode520 cc/scheduler/scheduler.cc:520: // The synchronous compositor needs to draw right away. ...
6 years, 2 months ago (2014-10-13 23:59:43 UTC) #29
brianderson
https://codereview.chromium.org/554973002/diff/370001/cc/scheduler/scheduler.h File cc/scheduler/scheduler.h (right): https://codereview.chromium.org/554973002/diff/370001/cc/scheduler/scheduler.h#newcode38 cc/scheduler/scheduler.h:38: virtual base::PowerMonitor* PowerMonitor() = 0; Since this isn't expected ...
6 years, 2 months ago (2014-10-14 00:44:57 UTC) #30
sunnyps
Addressed all comments. PTAL. https://codereview.chromium.org/554973002/diff/370001/cc/scheduler/scheduler.h File cc/scheduler/scheduler.h (right): https://codereview.chromium.org/554973002/diff/370001/cc/scheduler/scheduler.h#newcode38 cc/scheduler/scheduler.h:38: virtual base::PowerMonitor* PowerMonitor() = 0; ...
6 years, 2 months ago (2014-10-15 01:11:11 UTC) #31
danakj
https://codereview.chromium.org/554973002/diff/530001/cc/scheduler/scheduler.h File cc/scheduler/scheduler.h (right): https://codereview.chromium.org/554973002/diff/530001/cc/scheduler/scheduler.h#newcode90 cc/scheduler/scheduler.h:90: base::PowerMonitor::Get())); I think brian meant that you'd pass it ...
6 years, 2 months ago (2014-10-15 15:42:26 UTC) #32
sunnyps
On 2014/10/15 15:42:26, danakj wrote: > https://codereview.chromium.org/554973002/diff/530001/cc/scheduler/scheduler.h > File cc/scheduler/scheduler.h (right): > > https://codereview.chromium.org/554973002/diff/530001/cc/scheduler/scheduler.h#newcode90 > ...
6 years, 2 months ago (2014-10-15 19:38:07 UTC) #33
brianderson
lgtm. Nit: I wonder if we should rename the setting to "post_task_delay_precision_is_low_on_battery" or something like ...
6 years, 2 months ago (2014-10-15 23:16:45 UTC) #34
sunnyps
On 2014/10/15 23:16:45, brianderson wrote: > lgtm. > > Nit: I wonder if we should ...
6 years, 2 months ago (2014-10-15 23:52:17 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/554973002/570001
6 years, 2 months ago (2014-10-16 19:02:24 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/554973002/590001
6 years, 2 months ago (2014-10-16 20:26:42 UTC) #42
commit-bot: I haz the power
Committed patchset #15 (id:590001)
6 years, 2 months ago (2014-10-16 22:00:07 UTC) #43
commit-bot: I haz the power
6 years, 2 months ago (2014-10-16 22:01:29 UTC) #44
Message was sent while issue was closed.
Patchset 15 (id:??) landed as
https://crrev.com/34093979365b781fa6b9472ed8e4cdbfcef9a683
Cr-Commit-Position: refs/heads/master@{#299984}

Powered by Google App Engine
This is Rietveld 408576698