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

Issue 2036603002: MessagePumpForGpu - reduce potential work processing starvation (Closed)

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

Description

MessagePumpForGpu - reduce potential work starvation MessagePumpForGpu has been on Canary for a few days and I am still assessing whether it is better than standard MessagePumpForUI in terms of reducing [GPU hang] crashes. While it has eliminated hangs with some signatures the rate of hangs in WaitForWork has increased. When experimenting with MsgWaitForMultipleObjectsEx I realized that it favors messages over events - when an event is signaled and a message is available in the queue it returns a result that indicates a message even when the message doesn't belong to a current thread (e.g. a browser UI message). With a high volume of messages it might be possible for WaitForWork to keep looping and starve the work processing. It is possible with Direct Composition where some of UI input messages have to go through the GPU process message loop because its D3D surface window covers the entire browser window. The fix is to do an additional check for the event. Please note that this is a much less common code path so this shouldn't affect performance much in scenarios like video playback. Also I've added some diagnostics code to help with crash dump analysis. BUG=588798, 596190 Committed: https://crrev.com/33490baaa1e5601b9284e28f58a99a4dc0db90ea Cr-Commit-Position: refs/heads/master@{#397886}

Patch Set 1 : #

Total comments: 1

Patch Set 2 : Addressed feedback #

Total comments: 2

Patch Set 3 : Fixed typo #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -9 lines) Patch
M base/message_loop/message_pump_win.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
M base/message_loop/message_pump_win.cc View 1 2 2 chunks +13 lines, -9 lines 0 comments Download

Messages

Total messages: 19 (11 generated)
stanisc
PTAL
4 years, 6 months ago (2016-06-02 21:09:55 UTC) #5
Mark Mentovai
I’m going on vacation, so I defer to Bruce. Wait for his review, but once ...
4 years, 6 months ago (2016-06-02 21:25:15 UTC) #6
brucedawson
https://codereview.chromium.org/2036603002/diff/40001/base/message_loop/message_pump_win.cc File base/message_loop/message_pump_win.cc (right): https://codereview.chromium.org/2036603002/diff/40001/base/message_loop/message_pump_win.cc#newcode539 base/message_loop/message_pump_win.cc:539: if (WaitForSingleObject(event_, 0) == WAIT_OBJECT_0) Previously this loop would ...
4 years, 6 months ago (2016-06-03 00:18:31 UTC) #9
stanisc
I've done a bit more experimentation with tracing timing of suspected PeekMessage calls, then Bruce ...
4 years, 6 months ago (2016-06-03 22:44:45 UTC) #11
brucedawson
lgtm https://codereview.chromium.org/2036603002/diff/80001/base/message_loop/message_pump_win.cc File base/message_loop/message_pump_win.cc (right): https://codereview.chromium.org/2036603002/diff/80001/base/message_loop/message_pump_win.cc#newcode453 base/message_loop/message_pump_win.cc:453: // Remove this when the bug is fixes. ...
4 years, 6 months ago (2016-06-03 23:36:15 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2036603002/100001
4 years, 6 months ago (2016-06-04 01:46:52 UTC) #15
commit-bot: I haz the power
Committed patchset #3 (id:100001)
4 years, 6 months ago (2016-06-04 01:51:30 UTC) #17
commit-bot: I haz the power
4 years, 6 months ago (2016-06-04 01:53:09 UTC) #19
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/33490baaa1e5601b9284e28f58a99a4dc0db90ea
Cr-Commit-Position: refs/heads/master@{#397886}

Powered by Google App Engine
This is Rietveld 408576698