[Webkit-unassigned] [Bug 240006] [GTK][WPE] Expensive atomic operations, overabundant semaphore signaling in GPUProcess streaming IPC

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue May 3 07:02:23 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=240006

--- Comment #4 from Zan Dobersek <zan at falconsigh.net> ---
(In reply to Zan Dobersek from comment #2)
> Created attachment 458738 [details]
> Flattened WebProcess perf report

(In reply to Zan Dobersek from comment #3)
> Created attachment 458739 [details]
> Flattened GPUProcess perf report

These show, for each process, where time is spent when GPUProcess mode is active.

StreamClientConnection and StreamServerConnection methods operating on the buffer offset atomics are never-inlined to isolate those atomic ops as much as possible.
In WebProcess:
     3.44%     3.42%  WPEWebProcess    libWPEWebKit-1.0.so.3.17.0                         [.] IPC::StreamClientConnection::release
     2.34%     2.32%  WPEWebProcess    libWPEWebKit-1.0.so.3.17.0                         [.] IPC::StreamClientConnection::tryAcquire
in GPUProcess:
     8.27%     8.13%  xtGL work queue  libWPEWebKit-1.0.so.3.17.0          [.] IPC::StreamServerConnection::release
     2.62%     2.59%  xtGL work queue  libWPEWebKit-1.0.so.3.17.0          [.] IPC::StreamServerConnection::tryAcquire

Then, for semaphore signalling, in the WebProcess:
    17.96%     0.33%  WPEWebProcess    libWPEWebKit-1.0.so.3.17.0                         [.] IPC::Semaphore::signal

I suspect semaphore signalling could be improved more easily than the atomics, but both could use improvements. On Linux there's futexes which kind of fit into this use case, but not completely and not without a large amount of changes around this code.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220503/dbeec341/attachment.htm>


More information about the webkit-unassigned mailing list