Delay starting the Untrusted Modules thread
Categories
(Core :: DLL Services, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox99 | --- | fixed |
People
(Reporter: florian, Assigned: toshi)
References
Details
(Keywords: perf:startup)
Attachments
(1 file)
Example startup profile: https://share.firefox.dev/3LOxhu1
The CPU used by the Untrusted Modules thread seems to be competing with the parent process main thread and the privileged content and WebExtension process before startup is done. It's not a problem on my laptop that has many cores, but on machines with few cores, I think we might be delaying the end of startup.
If possible I think it would be good to delay this processing further (could it start from the "browser-startup-idle-tasks-finished" notification for example?), and lower its priority.
Assignee | ||
Comment 1•2 years ago
|
||
This patch is to delay starting UntrustedModulesProcessor
to avoid
processing a massive amount of loaded modules in the browser process
during startup.
To achive that, this patch introduces "unblock-untrusted-modules-thread"
notification. Before the notification, UntrustedModulesProcessor
is
created but marked as not ready. This means the processor does not
go beyond ScheduleNonEmptyQueueProcessing
. Once the notification is
observed, we propagate it to all existing child processes, and afterward
UntrustedModulesProcessor
in new processes will be marked ready from
the beginning.
Pushed by tkikuchi@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3336c8e9a43f Delay starting UntrustedModulesProcessor. r=mhowell,necko-reviewers,kershaw
Comment 3•2 years ago
|
||
Backed out for causing build bustages at Unified_cpp_xre_dllservices.
Backout link: https://hg.mozilla.org/integration/autoland/rev/0540af91a54c1e245d543f5fd28f4f806804a60d
Failure log: https://treeherder.mozilla.org/logviewer?job_id=369891472&repo=autoland&lineNumber=29496
Pushed by tkikuchi@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6f9edda31be0 Delay starting UntrustedModulesProcessor. r=mhowell,necko-reviewers,kershaw
Comment 5•2 years ago
|
||
Backed out for causing failures at TestHttpChannel.PBAsyncOpen.
Backout link: https://hg.mozilla.org/integration/autoland/rev/284e628591558623681afd8ffcfb326f18b55b25
Failure log: https://treeherder.mozilla.org/logviewer?job_id=369903603&repo=autoland&lineNumber=8159
Pushed by tkikuchi@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c63f50d02eac Delay starting UntrustedModulesProcessor. r=mhowell,necko-reviewers,kershaw
Comment 7•2 years ago
•
|
||
Backed out for causing bp-hybrid bustage on SocketProcessHost.cpp
- backout: https://hg.mozilla.org/integration/autoland/rev/2bd90fc4127df685aca09ec8e89c7ebb224f61be
- push: https://treeherder.mozilla.org/jobs?repo=autoland&group_state=expanded&revision=c63f50d02eacac3a4226cb336b68fef3759add5e
- note: the job did not run by default on this push ^, however it failed on a subsequent push: https://treeherder.mozilla.org/jobs?repo=autoland&group_state=expanded&selectedTaskRun=Vj6eQ-CeSJmfQauDhvAbig.0&revision=8b36a78698ed09f38c1bbf997d3187f22c2c133e&searchStr=windows%2C2012%2Cx64%2Cdebug%2Cbuild-win64-hybrid%2Fplain%2Cbp-hybrid
- failure log: https://treeherder.mozilla.org/logviewer?job_id=370034219&repo=autoland&lineNumber=51241
[task 2022-03-04T23:30:34.944Z] 23:30:34 INFO - /builds/worker/checkouts/gecko/netwerk/ipc/SocketProcessHost.cpp(180,10): error: use of undeclared identifier 'DllServices'
[task 2022-03-04T23:30:34.944Z] 23:30:34 INFO - RefPtr<DllServices> dllSvc(DllServices::Get());
[task 2022-03-04T23:30:34.944Z] 23:30:34 INFO - ^
[task 2022-03-04T23:30:34.944Z] 23:30:34 INFO - /builds/worker/checkouts/gecko/netwerk/ipc/SocketProcessHost.cpp(180,30): error: use of undeclared identifier 'DllServices'
[task 2022-03-04T23:30:34.944Z] 23:30:34 INFO - RefPtr<DllServices> dllSvc(DllServices::Get());
[task 2022-03-04T23:30:34.944Z] 23:30:34 INFO - ^
[task 2022-03-04T23:30:34.945Z] 23:30:34 INFO - /builds/worker/checkouts/gecko/netwerk/ipc/SocketProcessHost.cpp(180,29): error: parentheses were disambiguated as a function declaration [-Werror,-Wvexing-parse]
[task 2022-03-04T23:30:34.945Z] 23:30:34 INFO - RefPtr<DllServices> dllSvc(DllServices::Get());
[task 2022-03-04T23:30:34.945Z] 23:30:34 INFO - ^~~~~~~~~~~~~~~~~~~~
[task 2022-03-04T23:30:34.945Z] 23:30:34 INFO - /builds/worker/checkouts/gecko/netwerk/ipc/SocketProcessHost.cpp(180,30): note: add a pair of parentheses to declare a variable
[task 2022-03-04T23:30:34.945Z] 23:30:34 INFO - RefPtr<DllServices> dllSvc(DllServices::Get());
[task 2022-03-04T23:30:34.945Z] 23:30:34 INFO - ^
[task 2022-03-04T23:30:34.945Z] 23:30:34 INFO - (
[task 2022-03-04T23:30:34.945Z] 23:30:34 INFO - 3 errors generated.
[task 2022-03-04T23:30:34.946Z] 23:30:34 ERROR - gmake[4]: *** [/builds/worker/checkouts/gecko/config/rules.mk:660: SocketProcessHost.obj] Error 1
Pushed by tkikuchi@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fc528b1586e5 Delay starting UntrustedModulesProcessor. r=mhowell,necko-reviewers,kershaw
Comment 9•2 years ago
|
||
bugherder |
Assignee | ||
Updated•2 years ago
|
Description
•