Changeset 185704 in webkit
- Timestamp:
- Jun 18, 2015, 10:15:50 AM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 6 edited
-
ChangeLog (modified) (1 diff)
-
NetworkProcess/NetworkProcess.cpp (modified) (1 diff)
-
NetworkProcess/cache/NetworkCache.cpp (modified) (1 diff)
-
NetworkProcess/cache/NetworkCache.h (modified) (2 diffs)
-
NetworkProcess/cache/NetworkCacheStorage.cpp (modified) (1 diff)
-
NetworkProcess/cache/NetworkCacheStorage.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r185700 r185704 1 2015-06-18 Antti Koivisto <antti@apple.com> 2 3 ~4% Membuster regression after WebKit r185452 4 https://bugs.webkit.org/show_bug.cgi?id=146112 5 rdar://problem/21406677 6 7 Reviewed by Chris Dumez. 8 9 Clear the cache write queue on critical memory pressure. There can be substantial amount of memory there and we 10 don't know how long writing it out will take. System is often under I/O pressure too in low memory situations. 11 12 This also makes sense for process suspension where we send simulated critical memory event. 13 14 * NetworkProcess/NetworkProcess.cpp: 15 (WebKit::NetworkProcess::lowMemoryHandler): 16 * NetworkProcess/cache/NetworkCache.cpp: 17 (WebKit::NetworkCache::Cache::handleMemoryPressureNotification): 18 * NetworkProcess/cache/NetworkCache.h: 19 * NetworkProcess/cache/NetworkCacheStorage.cpp: 20 (WebKit::NetworkCache::Storage::clearWriteQueue): 21 * NetworkProcess/cache/NetworkCacheStorage.h: 22 1 23 2015-06-18 Csaba Osztrogonác <ossy@webkit.org> 2 24 -
trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp
r185605 r185704 177 177 { 178 178 platformLowMemoryHandler(critical); 179 #if ENABLE(NETWORK_CACHE) 180 if (NetworkCache::singleton().isEnabled()) 181 NetworkCache::singleton().handleMemoryPressureNotification(critical); 182 #endif 179 183 WTF::releaseFastMallocFreeMemory(); 180 184 } -
trunk/Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp
r184898 r185704 563 563 } 564 564 565 void Cache::handleMemoryPressureNotification(WebCore::Critical critical) 566 { 567 if (critical != WebCore::Critical::Yes) 568 return; 569 // There can be substantial amount of memory in the write queue and we don't know how long it will take to write it out. 570 // We may also be about to suspend the process. 571 if (m_storage) 572 m_storage->clearWriteQueue(); 573 } 574 565 575 String Cache::recordsPath() const 566 576 { -
trunk/Source/WebKit2/NetworkProcess/cache/NetworkCache.h
r183755 r185704 32 32 #include "NetworkCacheStorage.h" 33 33 #include "ShareableResource.h" 34 #include <WebCore/MemoryPressureHandler.h> 34 35 #include <WebCore/ResourceResponse.h> 35 36 #include <wtf/text/WTFString.h> … … 104 105 void clear(std::chrono::system_clock::time_point modifiedSince, std::function<void ()>&& completionHandler); 105 106 107 void handleMemoryPressureNotification(WebCore::Critical); 108 106 109 void dumpContentsToFile(); 107 110 -
trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.cpp
r185513 r185704 863 863 } 864 864 865 void Storage::clearWriteQueue() 866 { 867 LOG(NetworkCacheStorage, "(NetworkProcess) clearing write queue"); 868 869 m_pendingWriteOperations.clear(); 870 } 871 865 872 void Storage::deleteOldVersions() 866 873 { -
trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.h
r185513 r185704 80 80 // Null record signals end. 81 81 void traverse(TraverseFlags, TraverseHandler&&); 82 83 void clearWriteQueue(); 82 84 83 85 void setCapacity(size_t);
Note:
See TracChangeset
for help on using the changeset viewer.