New issue
Advanced search Search tips

Issue 844262 link

Starred by 2 users

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug

Blocked on:
issue 844849



Sign in to add a comment

GPU main thread runs hundreds of tasks per second in tough_compositor_cases with passthrough decoder

Project Member Reported by sunn...@chromium.org, May 18 2018

Issue description

To reproduce:

python tools\perf\run_benchmark run --browser=release --story-filter=beqojupo --reset-results thread_times.tough_compositor_cases

gpu_tasks_per_frame will be very high (~500)

You should be able to repro on a local build with this page:
http://jsbin.com/beqojupo/1/quiet?JS_FULL_SCREEN_INVALIDATION

Capture a trace, and you'll see hundreds of PerformIdleWork tasks.

This happens because pending queries are considered idle work in passthrough decoder, but they're not in validating decoder.

CommandBufferStub::OnMessageReceived calls ScheduleDelayedWork which posts a task to run PollWork after 2 secs. PollWork calls PerformWork which calls PerformIdleWork on the decoder. At this point, the queries are still pending, and ScheduleDelayedWork is called. But ScheduleDelayedWork overrides the default polling delay (1 sec), and instead posts another task for PollWork immediately. This cycle continues until the queries are retired.

The immediate fix is to remove HasPendingQueries from HasMoreIdleWork to match validating decoder behavior. The follow-up fix is to remove the delay override in ScheduleDelayedWork. Long term we should rethink how idle work and polling works.





 
Note: you need to run with --disable-gpu-rasterization (one-copy raster) for this to show up
Project Member

Comment 2 by bugdroid1@chromium.org, May 18 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ef1b3ab1cc2498425c46c021e9344c514392026c

commit ef1b3ab1cc2498425c46c021e9344c514392026c
Author: Sunny Sachanandani <sunnyps@chromium.org>
Date: Fri May 18 21:20:51 2018

Do not consider pending queries as idle work in passthrough decoder

Pending queries are processed separately from idle work so this is
redundant. However, removing this avoids the polling interval override
in CommandBufferStub::ScheduleDelayedWork, and prevents back to back
tasks being posted until queries are retired. This shows up as hundreds
of GPU tasks per frame in tough_compositor_cases.

Bug: 844262
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I4333261b00c2f95f87553aba10d72966928a8337
Reviewed-on: https://chromium-review.googlesource.com/1065232
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560043}
[modify] https://crrev.com/ef1b3ab1cc2498425c46c021e9344c514392026c/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc

Project Member

Comment 3 by bugdroid1@chromium.org, May 18 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/db2744fe6d080718ac44c3810dee794e4d3400d7

commit db2744fe6d080718ac44c3810dee794e4d3400d7
Author: Sunny Sachanandani <sunnyps@chromium.org>
Date: Fri May 18 21:21:45 2018

Remove idle work polling interval override

If idle work is still pending when PerformWork is called, the subsequent
ScheduleDelayedWork will post the same task with zero delay. This causes
hundreds of back to back tasks when queries are pending with passthrough
decoder.

This code is from when async texture upload was implemented as idle work
in crrev.com/12040049. After crrev.com/c/1065232, queries are not idle
work in passthrough decoder, and idle work is only used for read pixel
fences and GPU tracer. Both of these can be pending even after
PerformIdleWork is called, and cause the same issue as pending queries.

Bug: 844262
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I5aa0fc1575dab20aa2162d6af88d6499d6cf08e8
Reviewed-on: https://chromium-review.googlesource.com/1064981
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560044}
[modify] https://crrev.com/db2744fe6d080718ac44c3810dee794e4d3400d7/gpu/ipc/service/command_buffer_stub.cc

Status: Fixed (was: Assigned)
Status: Assigned (was: Fixed)
Revert for #3 was missing this bug and didn't get copied here.

commit 7bac98f5d17817cdee6de59d5bdc1f5e8426131c
Author: James Darpinian <jdarpinian@chromium.org>
Date: Sat May 19 22:30:51 2018

Revert "Remove idle work polling interval override"

This reverts commit db2744fe6d080718ac44c3810dee794e4d3400d7.

Caused failures on Win7 FYI trybots:
https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Win7%20FYI%20Release%20%28AMD%29/1236


* gpu_tests.pixel_integration_test.PixelIntegrationTest.Pixel_CSS3DBlueBox
* gpu_tests.pixel_integration_test.PixelIntegrationTest.Pixel_DirectComposition_Video_VP9
* gpu_tests.pixel_integration_test.PixelIntegrationTest.Pixel_GpuRasterization_ConcavePaths
* gpu_tests.pixel_integration_test.PixelIntegrationTest.Pixel_OffscreenCanvasAccelerated2D
* gpu_tests.pixel_integration_test.PixelIntegrationTest.Pixel_OffscreenCanvasTransferAfterStyleResize
* gpu_tests.pixel_integration_test.PixelIntegrationTest.Pixel_OffscreenCanvasTransferToImageBitmap
* gpu_tests.pixel_integration_test.PixelIntegrationTest.Pixel_SolidColorBackground
* gpu_tests.pixel_integration_test.PixelIntegrationTest.Pixel_Video_VP9
* gpu_tests.pixel_integration_test.PixelIntegrationTest.Pixel_WebGLGreenTriangle_AA_Alpha
* gpu_tests.pixel_integration_test.PixelIntegrationTest.Pixel_WebGLGreenTriangle_NoAA_Alpha
* gpu_tests.pixel_integration_test.PixelIntegrationTest.Pixel_WebGL_PremultipliedAlpha_False
* gpu_tests.screenshot_sync_integration_test.ScreenshotSyncIntegrationTest.ScreenshotSync_GPURasterWithCanvas
* gpu_tests.screenshot_sync_integration_test.ScreenshotSyncIntegrationTest.ScreenshotSync_SWRasterWithCanvas
* gpu_tests.screenshot_sync_integration_test.ScreenshotSyncIntegrationTest.ScreenshotSync_SWRasterWithDivs

Bug:   844849  

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I57da87a7242d332af1d3642e4161c61fb20b7836
Reviewed-on: https://chromium-review.googlesource.com/1067083
Commit-Queue: James Darpinian <jdarpinian@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560183}
[modify] https://crrev.com/7bac98f5d17817cdee6de59d5bdc1f5e8426131c/gpu/ipc/service/command_buffer_stub.cc

Comment 6 by kbr@chromium.org, May 22 2018

Blockedon: 844849

Comment 7 by kbr@chromium.org, May 22 2018

Status: Started (was: Assigned)
Note that https://chromium-review.googlesource.com/1064981 caused flaky test failures in  Issue 844849 . It's distressing that only the Win7 trybots were affected by this but let's please figure out where the gap in testing is. We could run one or more test suites on the Win10 bots with DirectComposition disabled, for example, or run some of the pixel_test pages with DirectComposition disabled. Please tell me what additional testing configurations would be desired to catch bugs like these.

I suspect the read pixel stuff breaks because of that change (read pixels is in decoder's "idle" work). I'll see if this reproduces on Win 10 with direct composition disabled.
Labels: -Pri-1 Pri-2
[GPU Triage Council]

Sign in to add a comment