|
|
Created:
6 years, 6 months ago by egor.starkov Modified:
6 years, 5 months ago Reviewers:
Ted C, Sami, newt (away), bulach, brianderson, Miguel Garcia, aruslan, Yaron, no sievers, Sami (do not use) CC:
chromium-reviews Base URL:
https://chromium.googlesource.com/chromium/src.git@master Project:
chromium Visibility:
Public. |
DescriptionRemove burst mode from VSyncMonitor.
Extra vsyncs after each rendering cause 1% more power consumption.
NOTRY=true
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=279997
Patch Set 1 #Patch Set 2 : Fix VSyncMonitorTest compilation. #Patch Set 3 : #
Messages
Total messages: 37 (0 generated)
Currently VSyncMonitor requests for 5 more vsync calls from system after every rendering, that look like dry shots, because rendering thread doesn't want to render any more. This increases power consumption by ~1% in scenario when cursor is just blinking on google.com. Measured on android 4.4 phone with test shell installed.
Adding @aruslan as he added the code initially and I'm not familiar with it's purpose.
On 2014/06/19 17:55:25, Ted C wrote: > Adding @aruslan as he added the code initially and I'm not familiar with it's > purpose. I don't know if we still need this or not, but the original intent was to keep scrolling smoother. Daniel should know more.
Yes I think it *might* cause jank if we are less aggressive in sending BeginFrame messages. Can we maybe reduce MAX_AUTO_ONVSYNC_COUNT instead? What are the common, representative use cases for this? How many vsync intervals pass without a frame update in such cases? (1% power consumption sounds a bit like it would be hard to measure against noise. If this specific case further only occurs a very small fraction of the time, then there are no practical power savings gained from this.)
I think postSyntheticVSync() should make keeping the vsync going a little longer largely unnecessary, so I'm not opposed to removing this. Is there a bug for the original reason we added this?
I see, so maybe this is actually better. And if |needs_begin_frame_| stays on, then we keep requesting ticks anyway. I'm not aware of a specific bug, things have changed a lot, so we could try to make the vsync accounting strict this way (1 request == 1 tick). If we find a latency regression where we explicitly need to send a proactive update (and for example ignore needs_begin_frame being off), then maybe it's better to do this in the right place rather than let VSyncMonitor handle this by ticking more than once. There's a slight chance that this uncovers a bug somewhere, where we don't request an update (have to check browser compositor things like missing a frame etc.), so just FYI. LGTM.
The CQ bit was checked by egor.starkov@samsung.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/egor.starkov@samsung.com/346813002/1
On 2014/06/20 18:31:54, sievers wrote: > I see, so maybe this is actually better. And if |needs_begin_frame_| stays on, > then we keep requesting ticks anyway. I'm not aware of a specific bug, things > have changed a lot, so we could try to make the vsync accounting strict this way > (1 request == 1 tick). > > If we find a latency regression where we explicitly need to send a proactive > update (and for example ignore needs_begin_frame being off), then maybe it's > better to do this in the right place rather than let VSyncMonitor handle this by > ticking more than once. > > There's a slight chance that this uncovers a bug somewhere, where we don't > request an update (have to check browser compositor things like missing a frame > etc.), so just FYI. > > LGTM. 1% could be of course a measurement error, but it seems to me that these vsyncs are not needed there anyway. So the patch will just remove unnecessary calls and simplify code a bit. Thanks for review.
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_dbg_triggered_tests on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_dbg_triggered...) chromium_presubmit on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/chromium_presubmit/bu...)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/chromium_presubmit/bu...)
On 2014/06/23 08:39:17, egor.starkov wrote: > On 2014/06/20 18:31:54, sievers wrote: > > I see, so maybe this is actually better. And if |needs_begin_frame_| stays on, > > then we keep requesting ticks anyway. I'm not aware of a specific bug, things > > have changed a lot, so we could try to make the vsync accounting strict this > way > > (1 request == 1 tick). > > > > If we find a latency regression where we explicitly need to send a proactive > > update (and for example ignore needs_begin_frame being off), then maybe it's > > better to do this in the right place rather than let VSyncMonitor handle this > by > > ticking more than once. > > > > There's a slight chance that this uncovers a bug somewhere, where we don't > > request an update (have to check browser compositor things like missing a > frame > > etc.), so just FYI. > > > > LGTM. > > 1% could be of course a measurement error, but it seems to me that these vsyncs > are > not needed there anyway. So the patch will just remove unnecessary calls and > simplify code a bit. > Thanks for review. Did you try running content_shell VSyncMonitorTest tests? I'd be suspicious that out of 287 content_shell tests only 4 has failed, and all of them a VSyncMonitor-related: C 1743.891s Main [==========] 287 tests ran. C 1743.891s Main [ PASSED ] 283 tests. C 1743.891s Main [ FAILED ] 4 tests, listed below: C 1743.891s Main [ FAILED ] org.chromium.content.browser.VSyncMonitorTest#testVSyncPeriodDisallowJBVSync (CRASHED) C 1743.892s Main [ FAILED ] org.chromium.content.browser.VSyncMonitorTest#testVSyncPeriodAllowJBVSync (CRASHED) C 1743.892s Main [ FAILED ] org.chromium.content.browser.VSyncMonitorTest#testVSyncActivationFromIdleDisallowJBVSync (CRASHED) C 1743.892s Main [ FAILED ] org.chromium.content.browser.VSyncMonitorTest#testVSyncActivationFromIdleAllowJBVSync (CRASHED) C 1743.892s Main C 1743.892s Main 4 FAILED TESTS http://build.chromium.org/p/tryserver.chromium/builders/android_dbg_triggered... Yours, -- R.
On 2014/06/24 02:36:14, aruslan wrote: > On 2014/06/23 08:39:17, egor.starkov wrote: > > On 2014/06/20 18:31:54, sievers wrote: > > > I see, so maybe this is actually better. And if |needs_begin_frame_| stays > on, > > > then we keep requesting ticks anyway. I'm not aware of a specific bug, > things > > > have changed a lot, so we could try to make the vsync accounting strict this > > way > > > (1 request == 1 tick). > > > > > > If we find a latency regression where we explicitly need to send a proactive > > > update (and for example ignore needs_begin_frame being off), then maybe it's > > > better to do this in the right place rather than let VSyncMonitor handle > this > > by > > > ticking more than once. > > > > > > There's a slight chance that this uncovers a bug somewhere, where we don't > > > request an update (have to check browser compositor things like missing a > > frame > > > etc.), so just FYI. > > > > > > LGTM. > > > > 1% could be of course a measurement error, but it seems to me that these > vsyncs > > are > > not needed there anyway. So the patch will just remove unnecessary calls and > > simplify code a bit. > > Thanks for review. > > Did you try running content_shell VSyncMonitorTest tests? > I'd be suspicious that out of 287 content_shell tests only 4 has failed, and all > of them a VSyncMonitor-related: > > C 1743.891s Main [==========] 287 tests ran. > C 1743.891s Main [ PASSED ] 283 tests. > C 1743.891s Main [ FAILED ] 4 tests, listed below: > C 1743.891s Main [ FAILED ] > org.chromium.content.browser.VSyncMonitorTest#testVSyncPeriodDisallowJBVSync > (CRASHED) > C 1743.892s Main [ FAILED ] > org.chromium.content.browser.VSyncMonitorTest#testVSyncPeriodAllowJBVSync > (CRASHED) > C 1743.892s Main [ FAILED ] > org.chromium.content.browser.VSyncMonitorTest#testVSyncActivationFromIdleDisallowJBVSync > (CRASHED) > C 1743.892s Main [ FAILED ] > org.chromium.content.browser.VSyncMonitorTest#testVSyncActivationFromIdleAllowJBVSync > (CRASHED) > C 1743.892s Main > C 1743.892s Main 4 FAILED TESTS > > http://build.chromium.org/p/tryserver.chromium/builders/android_dbg_triggered... > > Yours, > -- R. Thanks for pointing. I've checked those tests locally and found out that VSyncMonitorTest has 4 tests and they all are failing with my patch and without my patch. So I just updated my patchset to fix compilation error.
rubberstamp owners lgtm sievers approval is better than mine for this
The CQ bit was checked by egor.starkov@samsung.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/egor.starkov@samsung.com/346813002/20001
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_dbg_triggered_tests on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_dbg_triggered...)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: android_dbg_triggered_tests on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_dbg_triggered...)
The CQ bit was checked by egor.starkov@samsung.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/egor.starkov@samsung.com/346813002/20001
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_dbg_triggered_tests on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_dbg_triggered...)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: android_dbg_triggered_tests on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_dbg_triggered...)
The CQ bit was checked by egor.starkov@samsung.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/egor.starkov@samsung.com/346813002/20001
Message was sent while issue was closed.
Change committed as 279997
Message was sent while issue was closed.
A revert of this CL has been created in https://codereview.chromium.org/358473006/ by peter@chromium.org. The reason for reverting is: Four of the introduced tests time out on Android. VSyncMonitorTest#testVSyncActivationFromIdleAllowJBVSync VSyncMonitorTest#testVSyncActivationFromIdleDisallowJBVSync VSyncMonitorTest#testVSyncPeriodAllowJBVSync VSyncMonitorTest#testVSyncPeriodDisallowJBVSync The log output can be seen here: http://build.chromium.org/p/chromium.linux/builders/Android%20Tests%20%28dbg%... This failure could be observed in the try-bot results as part of the patch. Please do not use NOTRY unless you're absolutely certain that the failures are unrelated..
Message was sent while issue was closed.
This commit was reverted. So I've fixed the tests to follow the rule 1 request == 1 tick. VSyncMonitorTest should not fail now. Could you please review the new patchset?
Message was sent while issue was closed.
lgtm - thanks for fixing the test.
Message was sent while issue was closed.
On 2014/06/27 15:47:21, aruslan wrote: > lgtm - thanks for fixing the test. Hi Ruslan, do I need to create another review to commit this patch or I can just reopen this one and commit again through CQ? Br, Egor.
Message was sent while issue was closed.
On 2014/06/27 17:57:55, egor.starkov wrote: > On 2014/06/27 15:47:21, aruslan wrote: > > lgtm - thanks for fixing the test. > > Hi Ruslan, do I need to create another review to commit this patch > or I can just reopen this one and commit again through CQ? > > Br, > Egor. I always uploaded a new patch; may be there are simpler ways, but I'm not aware of them. Once uploaded - please add a reference to this CL and add OWNERS to lgtm the changes. Thanks, -- Ruslan.
Message was sent while issue was closed.
On 2014/06/27 18:02:06, aruslan wrote: > On 2014/06/27 17:57:55, egor.starkov wrote: > > On 2014/06/27 15:47:21, aruslan wrote: > > > lgtm - thanks for fixing the test. > > > > Hi Ruslan, do I need to create another review to commit this patch > > or I can just reopen this one and commit again through CQ? > > > > Br, > > Egor. > > I always uploaded a new patch; may be there are simpler ways, but I'm not aware > of them. > Once uploaded - please add a reference to this CL and add OWNERS to lgtm the > changes. > > Thanks, > -- Ruslan. (new patch == new issue in codereview.)
Message was sent while issue was closed.
On 2014/06/27 18:02:28, aruslan wrote: > On 2014/06/27 18:02:06, aruslan wrote: > > On 2014/06/27 17:57:55, egor.starkov wrote: > > > On 2014/06/27 15:47:21, aruslan wrote: > > > > lgtm - thanks for fixing the test. > > > > > > Hi Ruslan, do I need to create another review to commit this patch > > > or I can just reopen this one and commit again through CQ? > > > > > > Br, > > > Egor. > > > > I always uploaded a new patch; may be there are simpler ways, but I'm not > aware > > of them. > > Once uploaded - please add a reference to this CL and add OWNERS to lgtm the > > changes. > > > > Thanks, > > -- Ruslan. > > (new patch == new issue in codereview.) Ok, thanks.
Message was sent while issue was closed.
On 2014/06/27 at 18:37:04, egor.starkov wrote: > On 2014/06/27 18:02:28, aruslan wrote: > > On 2014/06/27 18:02:06, aruslan wrote: > > > On 2014/06/27 17:57:55, egor.starkov wrote: > > > > On 2014/06/27 15:47:21, aruslan wrote: > > > > > lgtm - thanks for fixing the test. > > > > > > > > Hi Ruslan, do I need to create another review to commit this patch > > > > or I can just reopen this one and commit again through CQ? > > > > > > > > Br, > > > > Egor. > > > > > > I always uploaded a new patch; may be there are simpler ways, but I'm not > > aware > > > of them. > > > Once uploaded - please add a reference to this CL and add OWNERS to lgtm the > > > changes. > > > > > > Thanks, > > > -- Ruslan. > > > > (new patch == new issue in codereview.) > > Ok, thanks. FYI, you can also re-open the old review and land the fixed patch that way through the commit queue. Having all the revision in the same place makes it a little easier for reviewers to see how the patch was changed. |