tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 98c65944dc288c9d3bbb509cbb82803c0e2f076e
parent 9853cc9958d74c45471db8998d234398466d9716
Author: agoloman <agoloman@mozilla.com>
Date:   Wed, 12 Nov 2025 20:08:30 +0200

Revert "Bug 1985327 Part 3: Make Linux process kill heuristic handle PROCESS_PRIORITY_FOREGROUND_HIGH. r=aosmond" for causing build bustages @LinuxProcessPriority.cpp.

This reverts commit 58ac339f24a145d48eb1a63bc993c5abf36001f5.

Revert "Bug 1985327 Part 2: Make Windows handle PROCESS_PRIORITY_FOREGROUND_HIGH. r=gfx-reviewers,lsalzman"

This reverts commit 0c524cd1098409316fc2d3ec08939941e7af3431.

Revert "Bug 1985327 Part 1: Elevate the priority of gpu process at process launch. r=gfx-reviewers,lsalzman"

This reverts commit d251e90a0e530f4b6aa09cf83103cee90b9c92a6.

Diffstat:
Mgfx/ipc/GPUProcessManager.cpp | 4----
Mhal/linux/LinuxProcessPriority.cpp | 12++++--------
Mhal/windows/WindowsProcessPriority.cpp | 2--
3 files changed, 4 insertions(+), 14 deletions(-)

diff --git a/gfx/ipc/GPUProcessManager.cpp b/gfx/ipc/GPUProcessManager.cpp @@ -615,10 +615,6 @@ void GPUProcessManager::OnProcessLaunchComplete(GPUProcessHost* aHost) { } #endif - // Set a high priority for the newly-created gpu process. - int pID = mProcess->GetChildProcessId(); - hal::SetProcessPriority(pID, hal::PROCESS_PRIORITY_FOREGROUND_HIGH); - ipc::Endpoint<PVsyncBridgeParent> vsyncParent; ipc::Endpoint<PVsyncBridgeChild> vsyncChild; nsresult rv = PVsyncBridge::CreateEndpoints( diff --git a/hal/linux/LinuxProcessPriority.cpp b/hal/linux/LinuxProcessPriority.cpp @@ -25,8 +25,7 @@ namespace mozilla::hal_impl { * 2. background processes * 3. background processes playing video (but no audio) * 4. foreground processes or processes playing or recording audio - * 5. gpu process or anything else high priority - * 6. the parent process + * 5. the parent process * * At the time of writing (2022) the base score for a process consuming very * little memory seems to be around ~667. Our adjustments are thus designed @@ -34,10 +33,9 @@ namespace mozilla::hal_impl { * close to the 1000 limit where they would be clamped. */ const uint32_t kParentOomScoreAdjust = 0; -const uint32_t kForegroundHighOomScoreAdjust = 100; -const uint32_t kForegroundOomScoreAdjust = 133; -const uint32_t kBackgroundPerceivableOomScoreAdjust = 167; -const uint32_t kBackgroundOomScoreAdjust = 200; +const uint32_t kForegroundOomScoreAdjust = 100; +const uint32_t kBackgroundPerceivableOomScoreAdjust = 133; +const uint32_t kBackgroundOomScoreAdjust = 167; const uint32_t kPreallocOomScoreAdjust = 233; static uint32_t OomScoreAdjForPriority(ProcessPriority aPriority) { @@ -50,8 +48,6 @@ static uint32_t OomScoreAdjForPriority(ProcessPriority aPriority) { return kPreallocOomScoreAdjust; case PROCESS_PRIORITY_FOREGROUND: return kForegroundOomScoreAdjust; - case PROCESS_PRIORITY_FOREGROUND_HIGH: - return kForegroundOomHighScoreAdjust; default: return kParentOomScoreAdjust; } diff --git a/hal/windows/WindowsProcessPriority.cpp b/hal/windows/WindowsProcessPriority.cpp @@ -26,8 +26,6 @@ void SetProcessPriority(int aPid, ProcessPriority aPriority) { priority = IDLE_PRIORITY_CLASS; } else if (aPriority == PROCESS_PRIORITY_BACKGROUND_PERCEIVABLE) { priority = BELOW_NORMAL_PRIORITY_CLASS; - } else if (aPriority == PROCESS_PRIORITY_FOREGROUND_HIGH) { - priority = ABOVE_NORMAL_PRIORITY_CLASS; } if (::SetPriorityClass(processHandle, priority)) {