[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 05:00:02 PST 2021


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

--- Comment #3 from Miguel Gomez <magomez at igalia.com> ---
(In reply to Carlos Alberto Lopez Perez from comment #2)
> 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.

Yes, you're right about the MemoryPressureMonitor, but it as a different goal than the MemoryPressureHandler: the former checks whether there's available memory in the system, while the latter checks the amount of memory used by the process against a limit.

-- 
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/c031e104/attachment.htm>


More information about the webkit-unassigned mailing list