Improve the GPUProcess' memory pressure handler to clear things like the IOSurfacePool and the SubimageCacheWithTimer.
Created attachment 417703 [details] Patch
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?
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.
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.
Created attachment 417711 [details] Patch
Committed r271526: <https://trac.webkit.org/changeset/271526> All reviewed patches have been landed. Closing bug and clearing flags on attachment 417711 [details].
<rdar://problem/73254115>