Closed Bug 1707610 Opened 3 years ago Closed 3 years ago

Don't take away the GPU process if we successfully initialize

Categories

(Core :: Graphics, task, P2)

Desktop
Windows
task

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox88 --- wontfix
firefox89 --- fixed
firefox90 --- fixed

People

(Reporter: aosmond, Assigned: aosmond)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

Right now we use a simple counter to decide when to disable the GPU process. If we lose it too many times, we take it away. We should move towards a model where we are more generous. E.g. If the GPU process crashes, but we initialized fine, rendered many frames successfully, we should in principle be allowed to keep restarting it indefinitely.

Originally, we should restart the GPU process after a fixed number of
attempts based on the layers.gpu-process.max_restarts pref. With this
patch, we now use this pref to control how many "unstable" restarts we
allow. A restart is "stable" if and only if the process uptime exceeds
the pref layers.gpu-process.stable.min-uptime-ts and if the process
renders a total number of frames exceeding the pref
layers.gpu-process.stable.frame-threshold. This allows users to keep the
GPU process for a lot longer if they are encountering infrequent
crashes. Should the user experience the GPU process crashing quickly
and/or without rendering many frames, we will disable it as before after
a few attempts and move into the parent process.

Priority: P3 → P2
Pushed by aosmond@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/336664d0f101
Make GPU process restart criteria depend on rendering frames and uptime. r=jrmuizel
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch

Comment on attachment 9220675 [details]
Bug 1707610 - Make GPU process restart criteria depend on rendering frames and uptime.

Beta/Release Uplift Approval Request

  • User impact if declined: Users will lose the GPU process more easily, and thus hardware acceleration.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): The patch changes the criteria for when we choose to take away the GPU process / fallback from acceleration. It is fairly conservative in that it requires the GPU process be used for 4+ minutes and producing frames, before it considers the current instance of the GPU process to be "stable" and thus permitted to be restarted without consequence. If the GPU process isn't considered "stable", it will use the same logic as we have been shipping for a long time to take it away after a few restarts.
  • String changes made/needed:
Attachment #9220675 - Flags: approval-mozilla-beta?

Comment on attachment 9220675 [details]
Bug 1707610 - Make GPU process restart criteria depend on rendering frames and uptime.

We are still in early beta and the developer feels confident that this is safe to uplift, approved for 89 beta 11, thanks.

Attachment #9220675 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: