RESOLVED FIXED220659
[GPUProcess] Improve the GPUProcess' memory pressure handler
https://bugs.webkit.org/show_bug.cgi?id=220659
Summary [GPUProcess] Improve the GPUProcess' memory pressure handler
Chris Dumez
Reported 2021-01-15 08:52:56 PST
Improve the GPUProcess' memory pressure handler to clear things like the IOSurfacePool and the SubimageCacheWithTimer.
Attachments
Patch (6.93 KB, patch)
2021-01-15 08:54 PST, Chris Dumez
no flags
Patch (6.69 KB, patch)
2021-01-15 09:47 PST, Chris Dumez
no flags
Chris Dumez
Comment 1 2021-01-15 08:54:35 PST
Simon Fraser (smfr)
Comment 2 2021-01-15 09:37:44 PST
Comment on attachment 417703 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=417703&action=review Should we also propagate the memory warning to the web content processes? Or will they also get the warning? > Source/WebCore/page/MemoryRelease.cpp:169 > + // Return unused pages back to the OS now as this will likely give us a little memory to work with. I don't think this comment adds anything. In fact, I'm confused by it. > Source/WebCore/page/MemoryRelease.cpp:176 > + if (synchronous == Synchronous::Yes) > + WTF::releaseFastMallocFreeMemory(); What's the reason for calling it a second time?
Chris Dumez
Comment 3 2021-01-15 09:41:25 PST
Comment on attachment 417703 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=417703&action=review >> Source/WebCore/page/MemoryRelease.cpp:169 >> + // Return unused pages back to the OS now as this will likely give us a little memory to work with. > > I don't think this comment adds anything. In fact, I'm confused by it. Ok. This was from releaseMemory() above. >> Source/WebCore/page/MemoryRelease.cpp:176 >> + WTF::releaseFastMallocFreeMemory(); > > What's the reason for calling it a second time? I am not sure. This is a stripped down version of releaseMemory() above.
Simon Fraser (smfr)
Comment 4 2021-01-15 09:46:17 PST
Comment on attachment 417703 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=417703&action=review >>> Source/WebCore/page/MemoryRelease.cpp:169 >>> + // Return unused pages back to the OS now as this will likely give us a little memory to work with. >> >> I don't think this comment adds anything. In fact, I'm confused by it. > > Ok. This was from releaseMemory() above. I need to read more closely. This is releasing "free" memory, so presumably pages that are free to return to the OS. The comments makes more sense now (but the comment should use "free", not "unused" to match the function name). >>> Source/WebCore/page/MemoryRelease.cpp:176 >>> + WTF::releaseFastMallocFreeMemory(); >> >> What's the reason for calling it a second time? > > I am not sure. This is a stripped down version of releaseMemory() above. I'm guessing this can touch pages and thus trigger them getting mapped back in.
Chris Dumez
Comment 5 2021-01-15 09:47:09 PST
EWS
Comment 6 2021-01-15 10:29:13 PST
Committed r271526: <https://trac.webkit.org/changeset/271526> All reviewed patches have been landed. Closing bug and clearing flags on attachment 417711 [details].
Radar WebKit Bug Importer
Comment 7 2021-01-15 10:30:22 PST
Note You need to log in before you can comment on or make changes to this bug.