[Webkit-unassigned] [Bug 188299] Web process never leaves memory pressured state if caused by per-process limit

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Aug 3 08:26:41 PDT 2018


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

--- Comment #4 from Simon Fraser (smfr) <simon.fraser at apple.com> ---
Comment on attachment 346470
  --> https://bugs.webkit.org/attachment.cgi?id=346470
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=346470&action=review

> Source/WTF/wtf/cocoa/MemoryPressureHandlerCocoa.mm:90
> +            // Per process notification are one shot things while the system status is a state.

I think it's confusing to talk about "per process" notifications here, since the reader will probably think that refers to the "DISPATCH_MEMORYPRESSURE_PROC_LIMIT_" notifications, when really the DISPATCH_MEMORYPRESSURE_ are per-process for processes with an explicit jetsam limit (as I understand it).

> Source/WTF/wtf/cocoa/MemoryPressureHandlerCocoa.mm:96
> +                return MemoryPressureHandler::singleton().isUnderMemoryPressure();

Is this line only about simulated memory pressure? If so, would be nice to rename that function since it's really confusing that the input to setUnderMemoryPressure() uses isUnderMemoryPressure().

> Source/WTF/wtf/cocoa/MemoryPressureHandlerCocoa.mm:109
> +            MemoryPressureHandler::singleton().setUnderMemoryPressure(isUnderVMMemoryPressure);

I'm still not sure how you get out of memory pressure with this code, since isUnderVMMemoryPressure doesn't consult DISPATCH_MEMORYPRESSURE_PROC_LIMIT_CRITICAL.

> Source/WTF/wtf/cocoa/MemoryPressureHandlerCocoa.mm:118
> -                NSLog(@"Got memory pressure notification (%s)", critical ? "critical" : "non-critical");
> +                NSLog(@"Got memory pressure notification %lu (%s)", status, isCritical ? "critical" : "non-critical");

These NSLogs should be WTFLogAlways, so they show in iOS syslog. Are they even useful with all the release logging we have? Should they be release logs?

-- 
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/20180803/e1444b3f/attachment.html>


More information about the webkit-unassigned mailing list