Changeset 269956 in webkit


Ignore:
Timestamp:
Nov 18, 2020 7:36:33 AM (3 years ago)
Author:
Chris Dumez
Message:

[GPUProcess] Main thread of the GPUProcess should have same priority as main thread of the WebContent
https://bugs.webkit.org/show_bug.cgi?id=219057

Reviewed by Simon Fraser.

Main thread of the GPUProcess should have same priority as main thread of the WebContent since it
is doing rendering on its behalf.

For now, this means that on macOS, the main threads of the GPU and WebContent processes with both
get UserInteractive QoS. On iOS, they will both still get UserInitiated QoS until our RunningBoard
foreground process assertion get fixed to get the right priority (<rdar://problem/71499731>).

  • GPUProcess/EntryPoint/Cocoa/XPCService/GPUService/Info-OSX.plist:

Use _ProcessType=App, similarly as what we do for the WebContent process. If we don't do
this, the process is an adaptive daemon and its QoS can never be higher than UserInitiated.
We need its priority to go to UserInteractive to match the WebContent process.

  • GPUProcess/GPUProcess.cpp:

(WebKit::GPUProcess::initializeGPUProcess):
Request UserInteractive QoS for the main thread of the GPUProcess, similarly to what we do
for the main thread of the WebContent process already in WebProcess::InitializeWebProcess().

Location:
trunk/Source/WebKit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r269953 r269956  
     12020-11-18  Chris Dumez  <cdumez@apple.com>
     2
     3        [GPUProcess] Main thread of the GPUProcess should have same priority as main thread of the WebContent
     4        https://bugs.webkit.org/show_bug.cgi?id=219057
     5
     6        Reviewed by Simon Fraser.
     7
     8        Main thread of the GPUProcess should have same priority as main thread of the WebContent since it
     9        is doing rendering on its behalf.
     10
     11        For now, this means that on macOS, the main threads of the GPU and WebContent processes with both
     12        get UserInteractive QoS. On iOS, they will both still get UserInitiated QoS until our RunningBoard
     13        foreground process assertion get fixed to get the right priority (<rdar://problem/71499731>).
     14
     15        * GPUProcess/EntryPoint/Cocoa/XPCService/GPUService/Info-OSX.plist:
     16        Use _ProcessType=App, similarly as what we do for the WebContent process. If we don't do
     17        this, the process is an adaptive daemon and its QoS can never be higher than UserInitiated.
     18        We need its priority to go to UserInteractive to match the WebContent process.
     19
     20        * GPUProcess/GPUProcess.cpp:
     21        (WebKit::GPUProcess::initializeGPUProcess):
     22        Request UserInteractive QoS for the main thread of the GPUProcess, similarly to what we do
     23        for the main thread of the WebContent process already in WebProcess::InitializeWebProcess().
     24
    1252020-11-18  Sam Weinig  <weinig@apple.com>
    226
  • trunk/Source/WebKit/GPUProcess/EntryPoint/Cocoa/XPCService/GPUService/Info-OSX.plist

    r253968 r269956  
    3737                <key>RunLoopType</key>
    3838                <string>NSRunLoop</string>
     39                <key>_ProcessType</key>
     40                <string>App</string>
    3941                <key>_MultipleInstances</key>
    4042                <true/>
  • trunk/Source/WebKit/GPUProcess/GPUProcess.cpp

    r269935 r269956  
    156156#endif
    157157
     158    // Match the QoS of the UIProcess since the GPU process is doing rendering on its behalf.
     159    WTF::Thread::setCurrentThreadIsUserInteractive(0);
     160
    158161    WebCore::setPresentingApplicationPID(parameters.parentPID);
    159162}
Note: See TracChangeset for help on using the changeset viewer.