RESOLVED FIXED 154254
Add mechanism to disable memory pressure handling
https://bugs.webkit.org/show_bug.cgi?id=154254
Summary Add mechanism to disable memory pressure handling
Keith Rollin
Reported 2016-02-15 13:31:32 PST
For debugging purposes, it would be handy to disable this.
Attachments
Patch (17.38 KB, patch)
2016-02-17 10:56 PST, Keith Rollin
no flags
Patch (19.35 KB, patch)
2016-02-18 13:47 PST, Keith Rollin
no flags
Radar WebKit Bug Importer
Comment 1 2016-02-15 13:58:40 PST
Radar WebKit Bug Importer
Comment 2 2016-02-15 13:58:43 PST
Keith Rollin
Comment 3 2016-02-17 10:56:34 PST
Chris Dumez
Comment 4 2016-02-17 12:02:43 PST
Comment on attachment 271566 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=271566&action=review So this impacts the freeing of memory when the process gets suspended as well. Is it intentional? This is not technically memory pressure even though we use more or less the same code for both cases. > Source/WebKit/mac/ChangeLog:23 > + In actuality, only the WebContent and Network processes heed the flag. How about the UIProcess? See for example on iOS: /Volumes/Data/WebKit/OpenSource/Source/WebKit2/UIProcess/ios/WebMemoryPressureHandlerIOS.mm It does not seem to be impacted by your patch but it probably should.
Chris Dumez
Comment 5 2016-02-17 12:20:35 PST
(In reply to comment #4) > Comment on attachment 271566 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=271566&action=review > > So this impacts the freeing of memory when the process gets suspended as > well. Is it intentional? This is not technically memory pressure even though > we use more or less the same code for both cases. > Apparently it is alright. But then, we also want to do it in the WebProcess suspension case as well: see MemoryPressureHandler::singleton().releaseMemory(Critical::Yes, Synchronous::Yes); calls in WebProcess.cpp.
Keith Rollin
Comment 6 2016-02-18 13:45:43 PST
> How about the UIProcess? See for example on iOS: > /Volumes/Data/WebKit/OpenSource/Source/WebKit2/UIProcess/ios/WebMemoryPressureHandlerIOS.mm I've added a check in that function and updated the check-in comment. >> So this impacts the freeing of memory when the process gets suspended as >> well. Is it intentional? This is not technically memory pressure even though >> we use more or less the same code for both cases. > Apparently it is alright. But then, we also want to do it in the WebProcess > suspension case as well: see > MemoryPressureHandler::singleton().releaseMemory(Critical::Yes, Synchronous::Yes); calls in WebProcess.cpp. I've added a check here, too.
Keith Rollin
Comment 7 2016-02-18 13:47:25 PST
Chris Dumez
Comment 8 2016-02-22 09:43:59 PST
Comment on attachment 271688 [details] Patch r=me
WebKit Commit Bot
Comment 9 2016-02-22 10:30:59 PST
Comment on attachment 271688 [details] Patch Clearing flags on attachment: 271688 Committed r196943: <http://trac.webkit.org/changeset/196943>
WebKit Commit Bot
Comment 10 2016-02-22 10:31:05 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.