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

Issue 2378583003: Ping watchdog thread during GpuChannel destruction (Closed)

Created:
4 years, 2 months ago by ericrk
Modified:
4 years, 2 months ago
Reviewers:
danakj, vmiura
CC:
chromium-reviews, piman+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Ping watchdog thread during GpuChannel destruction Currently GpuChannel destruction runs as a single large task in the GPU process. This can cause watchdog timeouts on very busy systems, as we can end up doing a huge number of GL commands in a single task. This change adds logic to ping the watchdog thread at regular intervals (assuming that destruction is moving forward, and hasn't actually hung). This should prevent the timeout hangs we're seeing. In addition to reporting progress in ContextGroup, we also report during shader, program, and texture deletion, as these are the three cases where we've actually seen timeouts. BUG=612219 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Committed: https://crrev.com/8767b2b934ea9f992399430f0ac78da93c1c9f4b Cr-Commit-Position: refs/heads/master@{#423751}

Patch Set 1 #

Total comments: 3

Patch Set 2 : remove throttling #

Total comments: 18

Patch Set 3 : feedback #

Total comments: 1

Patch Set 4 : smallf ix #

Patch Set 5 : revert to passing via destructor #

Total comments: 4

Patch Set 6 : Go back to passing via constructor #

Patch Set 7 : add GPU_EXPORT to ProgressReporter #

Patch Set 8 : Fix lifetime and use nullptr #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+246 lines, -238 lines) Patch
M gpu/command_buffer/service/context_group.h View 1 2 3 4 5 6 7 4 chunks +9 lines, -1 line 0 comments Download
M gpu/command_buffer/service/context_group.cc View 1 2 3 4 5 6 7 9 chunks +29 lines, -19 lines 2 comments Download
M gpu/command_buffer/service/context_group_unittest.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M gpu/command_buffer/service/framebuffer_manager_unittest.cc View 1 2 3 4 5 6 7 2 chunks +8 lines, -16 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc View 1 2 3 4 5 6 7 1 chunk +5 lines, -5 lines 0 comments Download
M gpu/command_buffer/service/in_process_command_buffer.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M gpu/command_buffer/service/memory_program_cache_unittest.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -4 lines 0 comments Download
M gpu/command_buffer/service/program_manager.h View 1 2 3 4 5 6 7 3 chunks +8 lines, -1 line 0 comments Download
M gpu/command_buffer/service/program_manager.cc View 1 2 3 4 5 6 7 4 chunks +16 lines, -10 lines 0 comments Download
M gpu/command_buffer/service/program_manager_unittest.cc View 1 2 3 4 5 6 7 4 chunks +14 lines, -17 lines 0 comments Download
A gpu/command_buffer/service/progress_reporter.h View 1 2 3 4 5 6 1 chunk +25 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/shader_manager.h View 1 2 3 4 5 6 7 3 chunks +8 lines, -1 line 0 comments Download
M gpu/command_buffer/service/shader_manager.cc View 1 2 3 4 5 6 7 3 chunks +5 lines, -1 line 0 comments Download
M gpu/command_buffer/service/shader_manager_unittest.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -2 lines 0 comments Download
M gpu/command_buffer/service/texture_manager.h View 1 2 3 4 5 6 7 3 chunks +8 lines, -1 line 0 comments Download
M gpu/command_buffer/service/texture_manager.cc View 1 2 3 4 5 6 7 4 chunks +13 lines, -3 lines 0 comments Download
M gpu/command_buffer/service/texture_manager_unittest.cc View 1 2 3 4 5 6 7 19 chunks +76 lines, -150 lines 0 comments Download
M gpu/command_buffer/tests/fuzzer_main.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M gpu/command_buffer/tests/gl_manager.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M gpu/gles2_conform_support/egl/context.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M gpu/ipc/service/gpu_command_buffer_stub.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M gpu/ipc/service/gpu_watchdog_thread.h View 1 2 3 4 5 6 7 3 chunks +5 lines, -0 lines 0 comments Download
M gpu/ipc/service/gpu_watchdog_thread.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 96 (70 generated)
ericrk
WDYT about this approach? I wonder if I should leave this out of ProgramManager/TextureManager/ShaderManager and ...
4 years, 2 months ago (2016-09-30 05:09:07 UTC) #35
vmiura
https://codereview.chromium.org/2378583003/diff/70019/gpu/ipc/service/gpu_command_buffer_stub.cc File gpu/ipc/service/gpu_command_buffer_stub.cc (right): https://codereview.chromium.org/2378583003/diff/70019/gpu/ipc/service/gpu_command_buffer_stub.cc#newcode117 gpu/ipc/service/gpu_command_buffer_stub.cc:117: // CheckArmed posts a task. Throttle this so we ...
4 years, 2 months ago (2016-09-30 18:24:35 UTC) #36
ericrk
https://codereview.chromium.org/2378583003/diff/70019/gpu/ipc/service/gpu_command_buffer_stub.cc File gpu/ipc/service/gpu_command_buffer_stub.cc (right): https://codereview.chromium.org/2378583003/diff/70019/gpu/ipc/service/gpu_command_buffer_stub.cc#newcode117 gpu/ipc/service/gpu_command_buffer_stub.cc:117: // CheckArmed posts a task. Throttle this so we ...
4 years, 2 months ago (2016-10-01 06:19:27 UTC) #37
ericrk
friendly ping :D
4 years, 2 months ago (2016-10-04 18:33:36 UTC) #46
vmiura
Minor request: Move progress_reporter to be a member of TextureManager and ShaderManager instead of passing ...
4 years, 2 months ago (2016-10-04 21:22:24 UTC) #47
danakj
https://codereview.chromium.org/2378583003/diff/230001/gpu/command_buffer/service/context_group.cc File gpu/command_buffer/service/context_group.cc (right): https://codereview.chromium.org/2378583003/diff/230001/gpu/command_buffer/service/context_group.cc#newcode488 gpu/command_buffer/service/context_group.cc:488: if (progress_reporter_) When is it null? This looks like ...
4 years, 2 months ago (2016-10-05 01:53:49 UTC) #48
ericrk
Thanks for the feedback. Updated. https://codereview.chromium.org/2378583003/diff/230001/gpu/command_buffer/service/context_group.cc File gpu/command_buffer/service/context_group.cc (right): https://codereview.chromium.org/2378583003/diff/230001/gpu/command_buffer/service/context_group.cc#newcode488 gpu/command_buffer/service/context_group.cc:488: if (progress_reporter_) On 2016/10/05 ...
4 years, 2 months ago (2016-10-05 18:07:32 UTC) #53
ericrk
On 2016/10/04 at 21:22:24, vmiura wrote: > Minor request: Move progress_reporter to be a member ...
4 years, 2 months ago (2016-10-05 18:53:22 UTC) #56
ericrk
Ok, moved back to passing ProgressReporter via Destroy for Texture/Shader/ProgramManager. I think I like this ...
4 years, 2 months ago (2016-10-05 19:35:33 UTC) #60
vmiura
On 2016/10/05 19:35:33, ericrk wrote: > Ok, moved back to passing ProgressReporter via Destroy for ...
4 years, 2 months ago (2016-10-05 19:56:24 UTC) #61
danakj
LGTM % vmiura https://codereview.chromium.org/2378583003/diff/390001/gpu/ipc/service/gpu_command_buffer_stub.cc File gpu/ipc/service/gpu_command_buffer_stub.cc (right): https://codereview.chromium.org/2378583003/diff/390001/gpu/ipc/service/gpu_command_buffer_stub.cc#newcode478 gpu/ipc/service/gpu_command_buffer_stub.cc:478: gmb_factory ? gmb_factory->AsImageFactory() : nullptr, this); ...
4 years, 2 months ago (2016-10-05 21:36:16 UTC) #62
ericrk
https://codereview.chromium.org/2378583003/diff/390001/gpu/ipc/service/gpu_command_buffer_stub.cc File gpu/ipc/service/gpu_command_buffer_stub.cc (right): https://codereview.chromium.org/2378583003/diff/390001/gpu/ipc/service/gpu_command_buffer_stub.cc#newcode478 gpu/ipc/service/gpu_command_buffer_stub.cc:478: gmb_factory ? gmb_factory->AsImageFactory() : nullptr, this); On 2016/10/05 21:36:15, ...
4 years, 2 months ago (2016-10-05 22:36:17 UTC) #63
ericrk
On 2016/10/05 19:56:24, vmiura wrote: > On 2016/10/05 19:35:33, ericrk wrote: > > Ok, moved ...
4 years, 2 months ago (2016-10-05 22:37:08 UTC) #64
vmiura
On 2016/10/05 22:37:08, ericrk wrote: > On 2016/10/05 19:56:24, vmiura wrote: > > On 2016/10/05 ...
4 years, 2 months ago (2016-10-05 23:25:54 UTC) #67
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2378583003/430001
4 years, 2 months ago (2016-10-06 00:34:39 UTC) #72
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/292902)
4 years, 2 months ago (2016-10-06 01:43:15 UTC) #74
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2378583003/430001
4 years, 2 months ago (2016-10-06 17:32:40 UTC) #76
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/239161)
4 years, 2 months ago (2016-10-06 18:57:45 UTC) #78
ericrk
Turns out the lifetime of objects in my last patch was wrong. GpuWatchdogThread (if it ...
4 years, 2 months ago (2016-10-06 21:41:34 UTC) #80
danakj
LGTM https://codereview.chromium.org/2378583003/diff/460001/gpu/command_buffer/service/context_group.cc File gpu/command_buffer/service/context_group.cc (right): https://codereview.chromium.org/2378583003/diff/460001/gpu/command_buffer/service/context_group.cc#newcode551 gpu/command_buffer/service/context_group.cc:551: ReportProgress(); nit: This one seems unneeded, when you're ...
4 years, 2 months ago (2016-10-06 21:49:54 UTC) #83
danakj
https://codereview.chromium.org/2378583003/diff/460001/gpu/command_buffer/service/context_group.cc File gpu/command_buffer/service/context_group.cc (right): https://codereview.chromium.org/2378583003/diff/460001/gpu/command_buffer/service/context_group.cc#newcode551 gpu/command_buffer/service/context_group.cc:551: ReportProgress(); On 2016/10/06 21:49:54, danakj wrote: > nit: This ...
4 years, 2 months ago (2016-10-06 21:51:02 UTC) #84
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2378583003/460001
4 years, 2 months ago (2016-10-06 21:52:23 UTC) #88
commit-bot: I haz the power
Try jobs failed on following builders: mac_optional_gpu_tests_rel on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_optional_gpu_tests_rel/builds/3953)
4 years, 2 months ago (2016-10-06 23:26:29 UTC) #90
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2378583003/460001
4 years, 2 months ago (2016-10-06 23:32:18 UTC) #92
commit-bot: I haz the power
Committed patchset #8 (id:460001)
4 years, 2 months ago (2016-10-07 00:11:10 UTC) #94
commit-bot: I haz the power
4 years, 2 months ago (2016-10-07 00:14:12 UTC) #96
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/8767b2b934ea9f992399430f0ac78da93c1c9f4b
Cr-Commit-Position: refs/heads/master@{#423751}

Powered by Google App Engine
This is Rietveld 408576698