[Webkit-unassigned] [Bug 222738] [GTK][WPE] Make MemoryPressureHandler behaviour configurable by the user

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 8 04:35:47 PST 2021


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

Carlos Alberto Lopez Perez <clopez at igalia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clopez at igalia.com

--- Comment #2 from Carlos Alberto Lopez Perez <clopez at igalia.com> ---
On Linux we rely on the MemoryPressureMonitor to notify the MemoryPressureHandler when it should trigger the release memory event.

The MemoryPressureMonitor is a thread that runs on the UIProcess (check Source/WebKit/UIProcess/linux/MemoryPressureMonitor.cpp) and polls the system memory information each 1-5 seconds. To get the system memory information it uses memory cgroups if those are available, otherwise it defaults to using /proc files.

When this UIProcess thread detects that the system memory is near to run low, it sends a signal (via WebKit IPC process) to all the sub-process (WebProcess, NetworkProcess, etc) related to that UIProcess so those can release the not needed memory.

That way we only have one thread doing the polling on the UIProcess and this thread notifies all the relevant sub-process (all the tabs of the browser) when necessary.

-- 
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/20210308/4d6d55c6/attachment.htm>


More information about the webkit-unassigned mailing list