~4% Membuster regression after WebKit r185452
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Jun 2015 17:15:50 +0000 (17:15 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Jun 2015 17:15:50 +0000 (17:15 +0000)
commit4910c8470bb2ce24b54bc7971c239f81179cf3da
treec1140b333a25780ad9fabae438ebad7673c8c464
parent04fa59d596f3cb2c63ce3b99df580968b83c09ad
~4% Membuster regression after WebKit r185452
https://bugs.webkit.org/show_bug.cgi?id=146112
rdar://problem/21406677

Reviewed by Chris Dumez.

Clear the cache write queue on critical memory pressure. There can be substantial amount of memory there and we
don't know how long writing it out will take. System is often under I/O pressure too in low memory situations.

This also makes sense for process suspension where we send simulated critical memory event.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::lowMemoryHandler):
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::handleMemoryPressureNotification):
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::clearWriteQueue):
* NetworkProcess/cache/NetworkCacheStorage.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185704 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/NetworkProcess/NetworkProcess.cpp
Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp
Source/WebKit2/NetworkProcess/cache/NetworkCache.h
Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.cpp
Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.h