| Summary: | Only check isPagedOut() under memory pressure | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Geoffrey Garen <ggaren> | ||||
| Component: | New Bugs | Assignee: | Geoffrey Garen <ggaren> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | ews-watchlist, heycam, keith_miller, mark.lam, msaboff, nham, saam, tzagallo, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Geoffrey Garen
2022-04-04 09:59:09 PDT
Created attachment 456581 [details]
Patch
One issue here is that isUnderMemoryPressure() doesn't actually tell you if the system is under memory pressure. Instead it just tells you if your process has received a critical memory pressure notification. They're not the same thing. Maybe we need a new method isSystemUnderMemoryPressure() that checks the system-wide kern.memorystatus_vm_pressure_level sysctl on a timer or something. I guess we can implement that in another patch. I could change to kern.memorystatus_vm_pressure_level here. Worth it? (In reply to Geoffrey Garen from comment #3) > I could change to kern.memorystatus_vm_pressure_level here. Worth it? I can probably write another patch that tries to do something sensible. My guess is the patch would also require a small sandbox change. Let's go with the speedo win here for now and we can test that change separately. Committed r292315 (249208@main): <https://commits.webkit.org/249208@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 456581 [details]. |