Closed Bug 1985327 Opened 7 months ago Closed 4 months ago

Firefox doesn't seem use 'above normal' priority for GPU process on Windows like some other browsers

Categories

(Core :: Graphics, defect, P3)

defect

Tracking

()

RESOLVED FIXED
147 Branch
Performance Impact medium
Tracking Status
firefox147 --- fixed

People

(Reporter: smaug, Assigned: bradwerth)

References

Details

Attachments

(3 files)

I was testing a new Intel 268v based Windows 11 laptop and scrolling feels a bit jank-y when using it on battery. Based on Task Manager Edge uses 'above normal' priority for couple of processes, I assume one of those is their GPU process. FF doesn't.
When tweaking FF's GPU process priority manually using Task Manager, scrolling/panning becomes very smooth.

Bug 1671490 was supposed to fix this, but at least I don't see it working.

A profile would help, we have markers showing the priorities (both requested, and actual priorities).

Performance Impact: --- → ?

The Performance Impact Calculator has determined this bug's performance impact to be medium. If you'd like to request re-triage, you can reset the Performance Impact flag to "?" or needinfo the triage sheriff.

Platforms: Windows
Impact on browser: Causes noticeable jank
[x] Able to reproduce locally

Performance Impact: ? → medium

The severity field is not set for this bug.
:bhood, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(bhood)

(In reply to Olli Pettay [:smaug][bugs@pettay.fi] from comment #2)

https://share.firefox.dev/45D5WXO

Thanks for the profiles. The patch from bug 1671490 seems to behave as expected in this profile. The parent process main thread and the GPU process main thread have the same priorities (before the patch the GPU process had a lower priority because it didn't have any visible window). The GPU process Rendered thread priority is slightly higher, and the content process priorities are slightly lower.

And with high prio gpu process https://share.firefox.dev/3Vq4bal

In this profile the priority of the entire GPU process is very high, close to the maximum.

Severity: -- → S4
Flags: needinfo?(bhood)
Priority: -- → P3

Based on the Windows profile manager GPU process had normal priority.
And anyhow, FF behavior is pretty bad with the current setup.

Dropping into triage for the team to evaluate this week.

Blocks: gfx-triage
Severity: S4 → S2

Discussed this with Bob briefly - we should definitely make sure we do what's needed to ensure the main GPU process threads don't get scheduled on e-cores. I don't know exactly what the win apis are to do this, but I imagine it's fairly straightforward.

I think I'll be able to improve behavior here.

Assignee: nobody → bwerth
No longer blocks: gfx-triage

This one-time sets the priority of the gpu process, which should have a
lasting effect, because it's not set anywhere else.

Pushed by bwerth@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/d251e90a0e53 https://hg.mozilla.org/integration/autoland/rev/69c03f267834 Part 1: Elevate the priority of gpu process at process launch. r=gfx-reviewers,lsalzman https://github.com/mozilla-firefox/firefox/commit/0c524cd10984 https://hg.mozilla.org/integration/autoland/rev/2a38ef12ba09 Part 2: Make Windows handle PROCESS_PRIORITY_FOREGROUND_HIGH. r=gfx-reviewers,lsalzman https://github.com/mozilla-firefox/firefox/commit/58ac339f24a1 https://hg.mozilla.org/integration/autoland/rev/dd18a149c9af Part 3: Make Linux process kill heuristic handle PROCESS_PRIORITY_FOREGROUND_HIGH. r=aosmond
Pushed by agoloman@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/98c65944dc28 https://hg.mozilla.org/integration/autoland/rev/91931310a2ae Revert "Bug 1985327 Part 3: Make Linux process kill heuristic handle PROCESS_PRIORITY_FOREGROUND_HIGH. r=aosmond" for causing build bustages @LinuxProcessPriority.cpp.

Backed out for causing build bustages @LinuxProcessPriority.cpp.

Flags: needinfo?(bwerth)
Pushed by bwerth@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/2e834c389bb2 https://hg.mozilla.org/integration/autoland/rev/e0147286c6fd Part 1: Elevate the priority of gpu process at process launch. r=gfx-reviewers,lsalzman https://github.com/mozilla-firefox/firefox/commit/d18227084c2c https://hg.mozilla.org/integration/autoland/rev/d49a066f2459 Part 2: Make Windows handle PROCESS_PRIORITY_FOREGROUND_HIGH. r=gfx-reviewers,lsalzman https://github.com/mozilla-firefox/firefox/commit/6a788c4a95df https://hg.mozilla.org/integration/autoland/rev/33bfa51fd872 Part 3: Make Linux process kill heuristic handle PROCESS_PRIORITY_FOREGROUND_HIGH. r=aosmond
Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 147 Branch
Flags: needinfo?(bwerth)
QA Whiteboard: [qa-triage-done-c148/b147]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: