RESOLVED DUPLICATE of bug 195938 184684
[bmalloc][Linux] Implement isUnderMemoryPressure()
https://bugs.webkit.org/show_bug.cgi?id=184684
Summary [bmalloc][Linux] Implement isUnderMemoryPressure()
Zan Dobersek
Reported 2018-04-17 00:22:48 PDT
We're lacking an implementation of isUnderMemoryPressure() in bmalloc on Linux, which would help a lot with the scavenging process in memory-constrained systems. When found to be under memory pressure, the Scavenger thread makes an extra effort to free as much mapped memory as possible. https://trac.webkit.org/browser/webkit/trunk/Source/bmalloc/bmalloc/AvailableMemory.h#L62 Calling back to bug #176089, one issue there was large memory consumption. While the fix in that bug helped a lot in that regard, always returning true in isUnderMemoryPressure() for testing purposes helps even further, keeping memory consumption of the WebProcess constantly well under 200MB, while otherwise it rises up to 300MB before it's finally scavenged down to a bit above 200MB. There are other use cases that would benefit from correctly determining in bmalloc when the process is in a memory pressure situation. MSE requires multible MBs of data being constantly downloaded and fed into the media pipeline. This is reflected in memory consumption, where lack of scavenges causes that consumption to grow as the playback proceeds. No clear idea how to implement this from my side. I suppose it could mimic memory pressure handler in WTF, but it might also depend on other things, e.g.whether GLib should be used in bmalloc.
Attachments
Zan Dobersek
Comment 1 2019-04-05 05:20:23 PDT
*** This bug has been marked as a duplicate of bug 195938 ***
Note You need to log in before you can comment on or make changes to this bug.