Bug 223717

Summary: Do not do process pre-warming when the system is under memory pressure
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit2Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cmarcelo, ews-watchlist, ggaren, kkinnunen, koivisto, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=223713
https://bugs.webkit.org/show_bug.cgi?id=223826
Attachments:
Description Flags
Patch none

Description Chris Dumez 2021-03-24 16:29:52 PDT
Do not do process pre-warming when the system is under memory pressure.

We already avoid launching prewarmed processes when the system is under memory pressure. However, this really only works as intended on iOS because we're not listening for all the memory pressure notification on macOS.
Also, we should return early in WebProcess::prewarmGlobally() if the system is under memory pressure now that the process has been launched.
Comment 1 Radar WebKit Bug Importer 2021-03-24 16:30:25 PDT
<rdar://problem/75810423>
Comment 2 Chris Dumez 2021-03-24 16:41:19 PDT
Created attachment 424199 [details]
Patch
Comment 3 EWS 2021-03-25 09:49:52 PDT
Committed r275038: <https://commits.webkit.org/r275038>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 424199 [details].