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

Issue 1943063002: Version of MessagePumpForUI optimized for GPU (Closed)

Created:
4 years, 7 months ago by stanisc
Modified:
4 years, 6 months ago
Reviewers:
Lei Zhang, jbauman
CC:
chromium-reviews, jam, sadrul, piman+watch_chromium.org, darin-cc_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Version of MessagePumpForUI optimized for GPU This is re-landing of https://codereview.chromium.org/1714263002. The original patch was reverted due to responsiveness issues with the browser main window on Window 10 during high GPU load. It turned out not pumping Windows messages promptly enough in the GPU process resulted in blocking mouse messages in the browser process due to the shared nature of the underlying message queue (and the fact that DXVA window is a disabled child of the main browser window covering its entire client area). The original patch is patch-set 1 and patch-set 2 shows the revised version. There are two main differences: - Message Pumping is now done on every loop iteration just like in MessagePumpForUI. - At the same time I moved away from using a work message to signal the consumer thread and used an event instead. This should mostly eliminate the message traffic in the main GPU thread message queue and hopefully reduce interference between the browser main thread and the GPU main thread. See the original change for the description of the efficiency improvements. The secondary goal for this change is to see whether stopping using work messages altogether would affect the rate of GPU hangs (crbug/596190). Hangs in KillTimer account for about 2-2.5% of all GPU hangs. I hope that eliminating any timer related code altogether might help to reduce the rate. The previously used signalling mechanism based on PostMessage could fail as well when the message queue was overfilled. The new mechanism based on SetEvent should be more reliable. BUG=588798 Committed: https://crrev.com/100d03d7637f9ec1f31ae012a7712a44d195c483 Cr-Commit-Position: refs/heads/master@{#396240}

Patch Set 1 : The original patch #

Patch Set 2 : Changes to the original patch #

Total comments: 2

Patch Set 3 : Addressed CR feedback #

Total comments: 2

Patch Set 4 : Merged with recent changes #

Patch Set 5 : Addressed CR feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+193 lines, -14 lines) Patch
M base/message_loop/message_loop_unittest.cc View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M base/message_loop/message_pump_win.h View 1 2 3 5 chunks +40 lines, -6 lines 0 comments Download
M base/message_loop/message_pump_win.cc View 1 2 3 4 10 chunks +149 lines, -8 lines 0 comments Download
M content/gpu/gpu_main.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 26 (12 generated)
stanisc
jbauman@chromium.org: Please review changes in content/gpu thakis@chromium.org: Please review changes in base
4 years, 7 months ago (2016-05-03 22:27:32 UTC) #6
jbauman
https://codereview.chromium.org/1943063002/diff/60001/base/message_loop/message_pump_win.cc File base/message_loop/message_pump_win.cc (right): https://codereview.chromium.org/1943063002/diff/60001/base/message_loop/message_pump_win.cc#newcode539 base/message_loop/message_pump_win.cc:539: while (PeekMessage(&msg, nullptr, 0, 0, PM_REMOVE)) { Actually, this ...
4 years, 7 months ago (2016-05-03 22:38:33 UTC) #7
stanisc
https://codereview.chromium.org/1943063002/diff/60001/base/message_loop/message_pump_win.cc File base/message_loop/message_pump_win.cc (right): https://codereview.chromium.org/1943063002/diff/60001/base/message_loop/message_pump_win.cc#newcode539 base/message_loop/message_pump_win.cc:539: while (PeekMessage(&msg, nullptr, 0, 0, PM_REMOVE)) { On 2016/05/03 ...
4 years, 7 months ago (2016-05-03 23:33:28 UTC) #8
stanisc
I've addressed John's concern regarding GPU work starvation and have re-done power testing on Windows ...
4 years, 7 months ago (2016-05-04 21:30:21 UTC) #9
stanisc
Ping.
4 years, 7 months ago (2016-05-05 20:27:43 UTC) #10
jbauman
lgtm On 2016/05/04 21:30:21, stanisc wrote: > I've addressed John's concern regarding GPU work starvation ...
4 years, 7 months ago (2016-05-05 20:49:05 UTC) #11
stanisc
thestig@, please take a look! This is essentially the same change that you've approved several ...
4 years, 7 months ago (2016-05-25 22:35:07 UTC) #15
Lei Zhang
On 2016/05/25 22:35:07, stanisc wrote: > thestig@, please take a look! > > This is ...
4 years, 7 months ago (2016-05-25 22:42:37 UTC) #16
Lei Zhang
https://codereview.chromium.org/1943063002/diff/80001/base/message_loop/message_pump_win.cc File base/message_loop/message_pump_win.cc (right): https://codereview.chromium.org/1943063002/diff/80001/base/message_loop/message_pump_win.cc#newcode541 base/message_loop/message_pump_win.cc:541: if (PeekMessage(&msg, nullptr, 0, 0, PM_REMOVE)) { Early return? ...
4 years, 7 months ago (2016-05-25 22:45:16 UTC) #17
stanisc
Yes, patch set 3 -> 4 doesn't have my changes (there was one merge conflict ...
4 years, 7 months ago (2016-05-25 23:49:11 UTC) #18
Lei Zhang
lgtm
4 years, 7 months ago (2016-05-25 23:49:58 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1943063002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1943063002/120001
4 years, 6 months ago (2016-05-26 17:12:38 UTC) #22
commit-bot: I haz the power
Committed patchset #5 (id:120001)
4 years, 6 months ago (2016-05-26 18:40:02 UTC) #24
commit-bot: I haz the power
4 years, 6 months ago (2016-05-26 18:41:27 UTC) #26
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/100d03d7637f9ec1f31ae012a7712a44d195c483
Cr-Commit-Position: refs/heads/master@{#396240}

Powered by Google App Engine
This is Rietveld 408576698