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

Issue 1308913004: GPU Channel's now maintain a global order number for each processed IPC. (Closed)

Created:
5 years, 3 months ago by David Yen
Modified:
5 years, 3 months ago
Reviewers:
jam, jbauman, piman
CC:
chromium-reviews, darin-cc_chromium.org, jam, piman+watch_chromium.org, sunnyps, vmiura
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

GPU Channel's now maintain a global order number for each processed IPC. Each IPC that a GPU Channel processes now is assigned a global order ID which is associated to each. As they get processed each channel can be queried what they are currently processing, what they have already processed, and what they will eventually process. The global order number also replaces the number of messages processed number that was used before. Technically they do not contain the same information (IE it is impossible to query how many messages a channel has processed now), but the old use cases didn't use the variable for this way. The old use cases can be replaced with the new order number, which was whether an IPC message has been processed already, and whether a channel has been active. BUG=514815 Committed: https://crrev.com/4151ec766a698853621a1fff2b2b80c8bc36cc0c Cr-Commit-Position: refs/heads/master@{#347428}

Patch Set 1 #

Patch Set 2 : Added support for current_order_num, unprocsessed_order_num #

Patch Set 3 : Removed unused function #

Patch Set 4 : GPU Channel now shares a single queue between IO/Main threads #

Patch Set 5 : Use 32 bit number for order number instead #

Patch Set 6 : No longer process all messages, rely on message loop for fairness #

Patch Set 7 : Reduce a lock when handling message #

Patch Set 8 : Fixed some comments and how GetNextMessageTimeTick() works. #

Patch Set 9 : Updated command buffer stub to use 32 bit order numbers #

Total comments: 24

Patch Set 10 : GPU Channel message queue placed in own class, applied suggestions #

Total comments: 22

Patch Set 11 : Move sync point retire to main thread, refactored some things #

Patch Set 12 : reordered include #

Total comments: 6

Patch Set 13 : DCHECK with unsigned 0 #

Patch Set 14 : Removed some unused variables, reformatted. #

Patch Set 15 : Enforce that queue is to not be modified after being disabled #

Total comments: 2

Patch Set 16 : schedule handle message when queue is not empty after we do not return early #

Patch Set 17 : No need to forward declare GpuChannelMessage #

Total comments: 3

Patch Set 18 : Fix windows error #

Patch Set 19 : Added requested DCHECKs #

Patch Set 20 : Reordered includes, started global order counter at 1 #

Patch Set 21 : sunnyps pointed out HasQueuedMessages() needs to check both queues, added helper function for this #

Patch Set 22 : rebase #

Patch Set 23 : Fix merge error #

Unified diffs Side-by-side diffs Delta from patch set Stats (+397 lines, -180 lines) Patch
M content/common/gpu/gpu_channel.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 9 chunks +15 lines, -11 lines 0 comments Download
M content/common/gpu/gpu_channel.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 19 chunks +357 lines, -148 lines 0 comments Download
M content/common/gpu/gpu_channel_manager.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download
M content/common/gpu/gpu_channel_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +16 lines, -10 lines 0 comments Download
M content/common/gpu/gpu_command_buffer_stub.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M content/common/gpu/gpu_command_buffer_stub.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +6 lines, -8 lines 0 comments Download

Messages

Total messages: 30 (7 generated)
David Yen
+jbauman for review of global order numbers implementation. +jam for review of "IPC::MessageFilter" usage and ...
5 years, 3 months ago (2015-08-27 22:05:51 UTC) #2
David Yen
I've refactored the GPU Channel messages so all messages are handled on a single locked ...
5 years, 3 months ago (2015-08-28 18:57:29 UTC) #3
David Yen
+piman for review also
5 years, 3 months ago (2015-08-31 16:36:17 UTC) #5
piman
https://codereview.chromium.org/1308913004/diff/160001/content/common/gpu/gpu_channel.cc File content/common/gpu/gpu_channel.cc (right): https://codereview.chromium.org/1308913004/diff/160001/content/common/gpu/gpu_channel.cc#newcode113 content/common/gpu/gpu_channel.cc:113: gpu_channel_io_->gpu_channel_manager()->GenerateGlobalOrderNumber(); I don't think gpu_channel_io_ is safe to use, ...
5 years, 3 months ago (2015-08-31 23:15:04 UTC) #6
David Yen
https://codereview.chromium.org/1308913004/diff/160001/content/common/gpu/gpu_channel.cc File content/common/gpu/gpu_channel.cc (right): https://codereview.chromium.org/1308913004/diff/160001/content/common/gpu/gpu_channel.cc#newcode113 content/common/gpu/gpu_channel.cc:113: gpu_channel_io_->gpu_channel_manager()->GenerateGlobalOrderNumber(); On 2015/08/31 23:15:04, piman (OOO back 2015-08-31) wrote: ...
5 years, 3 months ago (2015-09-01 02:01:52 UTC) #7
piman
https://codereview.chromium.org/1308913004/diff/160001/content/common/gpu/gpu_channel.cc File content/common/gpu/gpu_channel.cc (right): https://codereview.chromium.org/1308913004/diff/160001/content/common/gpu/gpu_channel.cc#newcode432 content/common/gpu/gpu_channel.cc:432: STLDeleteElements(&channel_messages_); On 2015/09/01 02:01:52, David Yen wrote: > On ...
5 years, 3 months ago (2015-09-01 03:55:27 UTC) #8
David Yen
Note this currently does not pass PRESUBMIT checks, I tracked it down and put a ...
5 years, 3 months ago (2015-09-01 19:08:03 UTC) #9
piman
One last thing, LGTM after that. https://codereview.chromium.org/1308913004/diff/220001/content/common/gpu/gpu_channel.cc File content/common/gpu/gpu_channel.cc (right): https://codereview.chromium.org/1308913004/diff/220001/content/common/gpu/gpu_channel.cc#newcode191 content/common/gpu/gpu_channel.cc:191: msg->sync_point_number); Same comment ...
5 years, 3 months ago (2015-09-01 19:23:45 UTC) #10
David Yen
https://codereview.chromium.org/1308913004/diff/220001/content/common/gpu/gpu_channel.cc File content/common/gpu/gpu_channel.cc (right): https://codereview.chromium.org/1308913004/diff/220001/content/common/gpu/gpu_channel.cc#newcode191 content/common/gpu/gpu_channel.cc:191: msg->sync_point_number); On 2015/09/01 19:23:44, piman (OOO back 2015-08-31) wrote: ...
5 years, 3 months ago (2015-09-01 19:34:34 UTC) #11
jbauman
https://codereview.chromium.org/1308913004/diff/220001/content/common/gpu/gpu_channel.cc File content/common/gpu/gpu_channel.cc (right): https://codereview.chromium.org/1308913004/diff/220001/content/common/gpu/gpu_channel.cc#newcode655 content/common/gpu/gpu_channel.cc:655: bool GpuChannel::OnMessageReceived(const IPC::Message& message) { Eventually we should restructure ...
5 years, 3 months ago (2015-09-01 20:03:06 UTC) #12
piman
On 2015/09/01 19:34:34, David Yen wrote: > https://codereview.chromium.org/1308913004/diff/220001/content/common/gpu/gpu_channel.cc > File content/common/gpu/gpu_channel.cc (right): > > https://codereview.chromium.org/1308913004/diff/220001/content/common/gpu/gpu_channel.cc#newcode191 ...
5 years, 3 months ago (2015-09-01 20:35:50 UTC) #13
piman
https://codereview.chromium.org/1308913004/diff/220001/content/common/gpu/gpu_channel.cc File content/common/gpu/gpu_channel.cc (right): https://codereview.chromium.org/1308913004/diff/220001/content/common/gpu/gpu_channel.cc#newcode840 content/common/gpu/gpu_channel.cc:840: message_queue_->ScheduleHandleMessage(); On 2015/09/01 20:03:06, jbauman wrote: > If the ...
5 years, 3 months ago (2015-09-01 20:36:36 UTC) #14
David Yen
https://codereview.chromium.org/1308913004/diff/220001/content/common/gpu/gpu_channel.cc File content/common/gpu/gpu_channel.cc (right): https://codereview.chromium.org/1308913004/diff/220001/content/common/gpu/gpu_channel.cc#newcode840 content/common/gpu/gpu_channel.cc:840: message_queue_->ScheduleHandleMessage(); On 2015/09/01 20:36:36, piman (OOO back 2015-08-31) wrote: ...
5 years, 3 months ago (2015-09-01 21:36:38 UTC) #15
piman
lgtm
5 years, 3 months ago (2015-09-01 22:03:58 UTC) #16
sunnyps
drive-by: It looks like a fair bit of complexity in this CL is due to ...
5 years, 3 months ago (2015-09-01 22:13:26 UTC) #17
jbauman
lgtm with one nit. https://codereview.chromium.org/1308913004/diff/300001/content/common/gpu/gpu_channel.cc File content/common/gpu/gpu_channel.cc (left): https://codereview.chromium.org/1308913004/diff/300001/content/common/gpu/gpu_channel.cc#oldcode561 content/common/gpu/gpu_channel.cc:561: handle_messages_scheduled_ = true; One thing ...
5 years, 3 months ago (2015-09-01 22:30:07 UTC) #18
David Yen
On 2015/09/01 22:13:26, sunnyps wrote: > drive-by: It looks like a fair bit of complexity ...
5 years, 3 months ago (2015-09-01 22:32:37 UTC) #19
David Yen
https://codereview.chromium.org/1308913004/diff/250002/content/common/gpu/gpu_channel.cc File content/common/gpu/gpu_channel.cc (right): https://codereview.chromium.org/1308913004/diff/250002/content/common/gpu/gpu_channel.cc#newcode1016 content/common/gpu/gpu_channel.cc:1016: processed_order_num_ = order_number; On 2015/09/01 20:03:06, jbauman wrote: > ...
5 years, 3 months ago (2015-09-01 22:46:52 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1308913004/360001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1308913004/360001
5 years, 3 months ago (2015-09-02 17:25:51 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_android_rel_ng/builds/64127)
5 years, 3 months ago (2015-09-02 19:52:40 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1308913004/420001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1308913004/420001
5 years, 3 months ago (2015-09-04 15:56:31 UTC) #28
commit-bot: I haz the power
Committed patchset #23 (id:420001)
5 years, 3 months ago (2015-09-04 16:54:54 UTC) #29
commit-bot: I haz the power
5 years, 3 months ago (2015-09-04 16:55:35 UTC) #30
Message was sent while issue was closed.
Patchset 23 (id:??) landed as
https://crrev.com/4151ec766a698853621a1fff2b2b80c8bc36cc0c
Cr-Commit-Position: refs/heads/master@{#347428}

Powered by Google App Engine
This is Rietveld 408576698