New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 836986 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Feature

Blocked on:
issue 844091

Blocking:
issue 819126
issue 837404



Sign in to add a comment

GPU Process watchdog should be disabled in background

Project Member Reported by ericrk@chromium.org, Apr 25 2018

Issue description

Android OS may deschedule Chrome more aggressively when the app is backgrounded. This leads to longer task execution times and likely causes spurious watchdog timeouts.

We should forward visibility messages from the Browser process to the GPU process, allowing it to customize its behavior when backgrounded (disabling the watchdog or greatly increasing timeouts).

While there's no huge user-visible impact of background GPU hangs, it generates a lot of spurious crash reports and makes it hard to see the real issues.

Note that this could also be used to tag crash reports with background/foreground information, which would further help in issue triage.
 
Blocking: 837404
Project Member

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

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

commit 033cd998a68d4ee1b29b974f367040e885fbd679
Author: Eric Karl <ericrk@chromium.org>
Date: Wed May 16 15:32:33 2018

Disable GPU watchdog while backgrounded

Android OS may deschedule Chrome more aggressively when the app is
backgrounded. This leads to longer task execution times and likely causes
spurious watchdog timeouts.

This change forwards visibility messages from the Browser process to the
GPU process, disabling the GPU watchdog when we are backgrounded.

Bug:  836986 
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: Ic209d463c6433e6ffcc8bff06c811272513e66c8
Reviewed-on: https://chromium-review.googlesource.com/1042531
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Eric Karl <ericrk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#559112}
[modify] https://crrev.com/033cd998a68d4ee1b29b974f367040e885fbd679/components/viz/host/server_gpu_memory_buffer_manager_unittest.cc
[modify] https://crrev.com/033cd998a68d4ee1b29b974f367040e885fbd679/components/viz/service/gl/gpu_service_impl.cc
[modify] https://crrev.com/033cd998a68d4ee1b29b974f367040e885fbd679/components/viz/service/gl/gpu_service_impl.h
[modify] https://crrev.com/033cd998a68d4ee1b29b974f367040e885fbd679/content/browser/renderer_host/compositor_impl_android.cc
[modify] https://crrev.com/033cd998a68d4ee1b29b974f367040e885fbd679/gpu/BUILD.gn
[modify] https://crrev.com/033cd998a68d4ee1b29b974f367040e885fbd679/gpu/ipc/service/gpu_watchdog_thread.cc
[modify] https://crrev.com/033cd998a68d4ee1b29b974f367040e885fbd679/gpu/ipc/service/gpu_watchdog_thread.h
[add] https://crrev.com/033cd998a68d4ee1b29b974f367040e885fbd679/gpu/ipc/service/gpu_watchdog_thread_unittest.cc
[modify] https://crrev.com/033cd998a68d4ee1b29b974f367040e885fbd679/services/viz/privileged/interfaces/gl/gpu_service.mojom

Comment 3 by kbr@chromium.org, May 17 2018

Blockedon: 844091
Project Member

Comment 4 by bugdroid1@chromium.org, Jun 5 2018

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

commit 96b3a46c94d4fe7b0649e4f3a3118f86642729de
Author: Eric Karl <ericrk@chromium.org>
Date: Tue Jun 05 19:47:58 2018

Disable GPU watchdog thread at startup when backgrounded

Change 1042531 handled sending background/foreground events to the GPU
process, allowing it to disable the watchdog thread while backgrounded.

This change extends this to add a |watchdog_starts_backgrounded|
field to GpuPreferences, allowing us to immediately disable the
watchdog thread (even before channel connection) when creating a new
GPU process in the background.

Bug:  836986 
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: I11e9b9989f437881ba7a14b4d4644ff75d6e6987
Reviewed-on: https://chromium-review.googlesource.com/1055682
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Eric Karl <ericrk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#564619}
[modify] https://crrev.com/96b3a46c94d4fe7b0649e4f3a3118f86642729de/content/browser/gpu/gpu_data_manager_impl.cc
[modify] https://crrev.com/96b3a46c94d4fe7b0649e4f3a3118f86642729de/content/browser/gpu/gpu_data_manager_impl.h
[modify] https://crrev.com/96b3a46c94d4fe7b0649e4f3a3118f86642729de/content/browser/gpu/gpu_data_manager_impl_private.cc
[modify] https://crrev.com/96b3a46c94d4fe7b0649e4f3a3118f86642729de/content/browser/gpu/gpu_data_manager_impl_private.h
[modify] https://crrev.com/96b3a46c94d4fe7b0649e4f3a3118f86642729de/content/browser/renderer_host/compositor_impl_android.cc
[modify] https://crrev.com/96b3a46c94d4fe7b0649e4f3a3118f86642729de/gpu/config/gpu_preferences.h
[modify] https://crrev.com/96b3a46c94d4fe7b0649e4f3a3118f86642729de/gpu/config/gpu_preferences_unittest.cc
[modify] https://crrev.com/96b3a46c94d4fe7b0649e4f3a3118f86642729de/gpu/ipc/common/gpu_preferences.mojom
[modify] https://crrev.com/96b3a46c94d4fe7b0649e4f3a3118f86642729de/gpu/ipc/common/gpu_preferences_struct_traits.h
[modify] https://crrev.com/96b3a46c94d4fe7b0649e4f3a3118f86642729de/gpu/ipc/service/gpu_init.cc
[modify] https://crrev.com/96b3a46c94d4fe7b0649e4f3a3118f86642729de/gpu/ipc/service/gpu_watchdog_thread.cc
[modify] https://crrev.com/96b3a46c94d4fe7b0649e4f3a3118f86642729de/gpu/ipc/service/gpu_watchdog_thread.h

Status: Fixed (was: Assigned)
Work is completed - we should watch to see if this impacts hang rates.

Sign in to add a comment