summaryrefslogtreecommitdiffstats
path: root/net/disk_cache
Commit message (Collapse)AuthorAgeFilesLines
...
* Disk Cache: Function re-ordering. No code change.rvargas@google.com2009-08-313-94/+101
| | | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/182023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24900 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Add a histogram to measure the latency ofrvargas@google.com2009-08-282-13/+20
| | | | | | | | | | | asynchronous IO. BUG=none TEST=none Review URL: http://codereview.chromium.org/178023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24829 0039d316-1c4b-4281-b951-d872f2087c98
* Fix DiskCacheEntryTest.MemoryOnlyDoomSparseEntryhclam@chromium.org2009-08-272-2/+2
| | | | | | | | | | | | | | BUG=12258 TEST=DiskCacheEntryTest.MemoryOnlyDoomSparseEntry The sequence that caused this test to break was to doom to the entry while it is still opened. Since closing the parent entry only delete itself and then child entries are not cleaned up. This is corrected by using InternalDoom() for destruction. Review URL: http://codereview.chromium.org/174592 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24594 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Reduce the chance of failing a unit test under Posix.rvargas@google.com2009-08-251-4/+15
| | | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/174374 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24246 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Implement asynchronous IO for Posix.rvargas@google.com2009-08-219-47/+326
| | | | | | | | | | BUG=16507 TEST=Unittests Review URL: http://codereview.chromium.org/173170 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23990 0039d316-1c4b-4281-b951-d872f2087c98
* Revert cl 23919 to investigate valgrind failures.rvargas@google.com2009-08-219-312/+45
| | | | | | | | | | | TBR=willchan TEST=none BUG=none Review URL: http://codereview.chromium.org/174205 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23926 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Close the experiment for new users.rvargas@google.com2009-08-211-20/+15
| | | | | | | | | | | | Also, make sure that only the main cache runs an experiment. BUG=none TEST=none Review URL: http://codereview.chromium.org/173132 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23923 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Implement asynchronous IO for Posix.rvargas@google.com2009-08-219-45/+312
| | | | | | | | | | BUG=16507 TEST=Unittests Review URL: http://codereview.chromium.org/171085 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23919 0039d316-1c4b-4281-b951-d872f2087c98
* Disk Cache: Lower the definition of a loaded system fromrvargas@google.com2009-08-113-15/+19
| | | | | | | | | | | | | | | 10 pending operations to 5. Data from the Beta channel shows that for all group sizes except one, the 99.90% cutoff of number of pending operations falls below 5 (in fact, below 3). BUG=none TEST=none Review URL: http://codereview.chromium.org/164355 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23120 0039d316-1c4b-4281-b951-d872f2087c98
* Disk Cache: cleanup of OpenBlockFile.rvargas@google.com2009-08-113-7/+31
| | | | | | | | | | | | Don't add the file to the list of open files until it passes all sanity checks. BUG=18174 TEST=unittest Review URL: http://codereview.chromium.org/164336 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23090 0039d316-1c4b-4281-b951-d872f2087c98
* Try again: Check blockfile size before attempting to read the header.mattm@chromium.org2009-08-083-18/+53
| | | | | | | | | | | Reading past the last page of a mmapped file will SIGBUS. BUG=18174 TEST=truncate Default/Cache/data_* to zero bytes, launch chrome, try to load a website. It shouldn't crash. Review URL: http://codereview.chromium.org/165174 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22843 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Check blockfile size before attempting to read the header."mattm@chromium.org2009-08-072-26/+0
| | | | | | | | | | | | The unittest isn't liked by windows. This reverts commit c0be0e8cda2bfe9c1eccb662ccdad9a2b7768132. TBR=rvargas Review URL: http://codereview.chromium.org/165157 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22786 0039d316-1c4b-4281-b951-d872f2087c98
* Check blockfile size before attempting to read the header.mattm@chromium.org2009-08-072-0/+26
| | | | | | | | | | | Reading past the last page of a mmapped file will SIGBUS. BUG=18174 TEST=truncate Default/Cache/data_* to zero bytes, launch chrome, try to load a website. It shouldn't crash. Review URL: http://codereview.chromium.org/164132 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22781 0039d316-1c4b-4281-b951-d872f2087c98
* Relanding Coverity fixes from http://codereview.chromium.org/159862 ↵phajdan.jr@chromium.org2009-08-061-1/+1
| | | | | | | | | | | | | excluding the broken ones. The change of GURL -> const GURL& caused some nasty crash and the change got reverted. TEST=none BUG=none Review URL: http://codereview.chromium.org/164095 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22682 0039d316-1c4b-4281-b951-d872f2087c98
* Disk Cache: Don't depend on the backend being enabled torvargas@google.com2009-08-064-21/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | be able to return the key of an open entry. Whenever a critical corruption is detected by the disk cache, the backend disables itself and starts failing all requests until it's able to re-create the backing store. Key's longer than 928 bytes are not stored inside the entry itself, so a file object is required to access them. The backend will reject any request for a file object after it is disabled, so a user's request for the key of an open entry will also fail. Now we keep a pointer to the related file object (if needed) so that we don't have to ask the backend for it when the user requests the current key. BUG=9952 TEST=unittest Review URL: http://codereview.chromium.org/165030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22637 0039d316-1c4b-4281-b951-d872f2087c98
* Revert of r22559.aa@chromium.org2009-08-061-1/+1
| | | | | | | | | | | | | | | | | | This caused an easily reproducible crash: 1. Start with a fresh profile 2. Navigate to google.com 3. Restart 4. Navigate to google.com 5. crash The change from pass-by-value to pass-by-ref in fav_icon_helper.* seems to be to blame, but I can't see it right off. TBR=phajdan.jr@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22595 0039d316-1c4b-4281-b951-d872f2087c98
* Bunch of Coverity fixes, rather minor severity.phajdan.jr@chromium.org2009-08-061-1/+1
| | | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/159862 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22559 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Open the disk cache experiment for new users.rvargas@google.com2009-08-013-9/+25
| | | | | | | | | | | | Also, fix the code that makes the unit tests have consistent results. BUG=none TEST=none Review URL: http://codereview.chromium.org/160485 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22238 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Remove remaining uses of RankingsNode.pointer.rvargas@google.com2009-07-3010-46/+117
| | | | | | | | | | | | | We now have a map of open entries so we don't need to do a lookup through the rankings node anymore. This simplifies the 64 bit version of the code. BUG=17881 TEST=unittests Review URL: http://codereview.chromium.org/159643 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22074 0039d316-1c4b-4281-b951-d872f2087c98
* Assorted fixes for 64-bit.deanm@chromium.org2009-07-281-2/+2
| | | | | | | Review URL: http://codereview.chromium.org/160288 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21891 0039d316-1c4b-4281-b951-d872f2087c98
* Disk Cache: Delete chained block files when they become empty.rvargas@google.com2009-07-284-22/+121
| | | | | | | | | | | | | | | We were leaving empty block files in the chain, and worst of all, not reusing them because we were thinking that these files were "almost full". Now we also check for empty files when the cache starts. BUG=16740 TEST=unittest. Review URL: http://codereview.chromium.org/159451 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21762 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Avoid restarting the cache while it may be in use.rvargas@google.com2009-07-243-5/+19
| | | | | | | | | | | | | | Now the code that releases resources runs from the message loop so that methods can cause the cache to disable itself while still being able to touch internal state. BUG=17604 TEST=unittests. Review URL: http://codereview.chromium.org/159327 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21550 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Fix handling of invalid entries that are detectedrvargas@google.com2009-07-238-80/+196
| | | | | | | | | | | | | | | | | | | | when doing evictions or enumerations. This cl fixes an issue with dirty entries being deleted twice from disk, and improves the whole thing so that different flavors or corrupt entries are removed gracefully. We started deleting things twice when we created the map of currently-open entries, because we don't want to have dirty entries on that map, so it is possible to have multiple EntryImpl objects that refer to the same entry (for corrupt entries). BUG=17474 TEST=Unittests, stress_cache.exe Review URL: http://codereview.chromium.org/155951 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21360 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Add support for having a sparse entry block thatrvargas@google.com2009-07-176-49/+277
| | | | | | | | | | | | | | | | | | is not totally filled. This is required to allow two consecutive writes to fill a given range without caring about the actual start offset of the second one (as long as it is right where the first one ended). This CL also takes care of all pending TODOs of the sparse disk cache. Sparse disk cache support is now feature complete. BUG=12258 TEST=unittests Review URL: http://codereview.chromium.org/155590 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20988 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Generate total-load-time histograms from thervargas@google.com2009-07-111-0/+26
| | | | | | | | | | | disk cache experiment. BUG=none TEST=none Review URL: http://codereview.chromium.org/155380 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20452 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Don't evict entries if we are busy doing other stuff.rvargas@google.com2009-07-094-20/+58
| | | | | | | | | BUG=10727 TEST=none Review URL: http://codereview.chromium.org/155314 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20330 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Add explicit support for eviction / deletionrvargas@google.com2009-07-097-13/+279
| | | | | | | | | | | | | | | | | | | | | | | of sparse entries. I started to add code to modify the children_map of the parent entry when a child is evicted but that ended up being too much trouble for too little gain. We have to be prepared to handle the case of not finding a child entry because there is no way to make sure that the process doesn't go away at any time, so adding a lot of complexity just to avoid an extra entry lookup is just not worth it. On the other hand, potentially freeing up a lot of space when a sparse entry is deleted (insetad of just waiting for the eviction code to do the cleanup) seems like a good thing. BUG=12258 TEST=unittest Review URL: http://codereview.chromium.org/149306 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20325 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Additional code cleanup after CL 20067.rvargas@google.com2009-07-081-20/+10
| | | | | | | | | BUG=15596 TEST=none Review URL: http://codereview.chromium.org/155231 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20190 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Keep a map of all open entries.rvargas@google.com2009-07-077-40/+95
| | | | | | | | | | | | | | | | | We still have a few crashes when for some reason we believe an entry is not dirty and we follow the pointer stored by its rankings node only to crash while accessing the memory. I have no explanation to why the dirty id matches the current one (a page boundary issue maybe?), but having a map with all open entries solves the issue of having to follow pointers from disk. BUG=15596, b/1120346 TEST=unittests Review URL: http://codereview.chromium.org/149218 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20067 0039d316-1c4b-4281-b951-d872f2087c98
* Fix 15 coverity complaints.rvargas@google.com2009-07-016-6/+6
| | | | | | | | | | | | Most of the changes are cosmetic, but there is also a memory leak in CreateExpiredServer. BUG=none TEST=none Review URL: http://codereview.chromium.org/153001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19788 0039d316-1c4b-4281-b951-d872f2087c98
* Use C99 standard format macros for 64-bit values.agl@chromium.org2009-06-291-1/+2
| | | | | | | | | | | | | | | | | | | Currently we have several uses of %I64d in format strings to indicate a 64-bit value. This does not work on Mac or Linux, where 'I' indicates the use of locale specific digits. Instead, we introduce base/format_macros.h which mimic the C99 standard macros for 64-bit values in a cross-platform manner. Dean pointed out that V8 is handling this themselves rather than use inttypes.h. Maybe we'll end up going down the same path but, for the moment, we'll try and do it the 'correct' way and see how it works out. http://codereview.chromium.org/147154 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19500 0039d316-1c4b-4281-b951-d872f2087c98
* Add a command line switch to allow setting the max sizervargas@google.com2009-06-261-0/+4
| | | | | | | | | | | | | | of the disk cache. This switch is intended for troubleshooting, not to add another supported configuration. BUG=15117 TEST=none Review URL: http://codereview.chromium.org/146136 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19439 0039d316-1c4b-4281-b951-d872f2087c98
* Sparse IO implementation for memory-only cachehclam@chromium.org2009-06-265-73/+438
| | | | | | | | | | | | | | Implemented the following methods: MemEntryImpl::ReadSparseData MemEntryImpl::WriteSparseData MemEntryImpl::GetAvailableRange TEST=DiskCacheEntryTest.Memory* original CL: http://codereview.chromium.org/140049 Review URL: http://codereview.chromium.org/147217 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19380 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Implementation for memory only sparse caching" r19270.scherkus@chromium.org2009-06-255-438/+73
| | | | | | | | | | | TBR=rvargas TEST=none BUG=none Review URL: http://codereview.chromium.org/149041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19308 0039d316-1c4b-4281-b951-d872f2087c98
* Implementation for memory only sparse cachinghclam@chromium.org2009-06-255-73/+438
| | | | | | | | | | | | Implemented the following methods for memory only cache: ReadSparseData WriteSparseData GetAvailableRange BUG=12258 Review URL: http://codereview.chromium.org/140049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19270 0039d316-1c4b-4281-b951-d872f2087c98
* Disk Cache: Split some time histograms in groups basedrvargas@google.com2009-06-255-35/+75
| | | | | | | | | | | on the cache size. BUG=10727 TEST=none Review URL: http://codereview.chromium.org/146129 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19256 0039d316-1c4b-4281-b951-d872f2087c98
* Disk Cache: Add more clients to the current experiment.rvargas@google.com2009-06-241-5/+21
| | | | | | | | | | | | | For some reason, I have less than 1% of clients taking part of the eviction algorithm experiment, so I'm adding clients again. BUG=none TEST=none Review URL: http://codereview.chromium.org/147066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19175 0039d316-1c4b-4281-b951-d872f2087c98
* Disk Cache: Fix a dumb warning about a variable not being initialized.rvargas@google.com2009-06-231-1/+1
| | | | | | | | | TBR=nsylvain BUG=none Review URL: http://codereview.chromium.org/146054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19071 0039d316-1c4b-4281-b951-d872f2087c98
* Disk Cache: Implement GetAvailableRange for the regular disk cache.rvargas@google.com2009-06-233-17/+136
| | | | | | | | | | | This is required to enable sparse caching. BUG=12258 TEST=unittest Review URL: http://codereview.chromium.org/146005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19069 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: First pass to add support for sparse entries.rvargas@google.com2009-06-1811-12/+1557
| | | | | | | | | | | | | Adding Read/Write support. BUG=12258 TEST=unittests. original review: http://codereview.chromium.org/126179 Review URL: http://codereview.chromium.org/132031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18772 0039d316-1c4b-4281-b951-d872f2087c98
* Revert cl 18723.rvargas@google.com2009-06-1811-1547/+12
| | | | | | | TBR=nsylvain git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18726 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: First pass to add support for sparse entries.rvargas@google.com2009-06-1811-12/+1547
| | | | | | | | | | | | Adding Read/Write support. BUG=12258 TEST=unittests. Review URL: http://codereview.chromium.org/126179 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18723 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce parent and child entries for MemEntryImplhclam@chromium.org2009-06-155-32/+167
| | | | | | | | | | | | | | | | | | | | | Defines enums for kParentEntry and kChildEntry in MemEntryImpl. Also has code in MemBackendImpl to create a slave entry. Parent entries are non-sparse entries until sparse API are called on them, and they would start to keep a list of child entries. Child entries hold partial content and are not susposed to be accessible from the public and are managed by the parent entry that created it. Child entries are registered in the backend's ranking list to allow individual eviction. More details about how child entries are to be used are in the comments. TEST=DiskCacheEntryTest.MemoryOnlyEnumerationWithSlaveEntries Review URL: http://codereview.chromium.org/120004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18432 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Avoid recursion when trimming entries.rvargas@google.com2009-06-103-3/+9
| | | | | | | | | | | | | | TrimCacheV2() calls EvictEntry() to move a given entry to the "deleted" list. EvictEntry() deletes the actual data, and that may end up calling ModifyStorageSize() and TrimCacheV2() again. BUG=b/1909376 TEST=none Review URL: http://codereview.chromium.org/121002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18115 0039d316-1c4b-4281-b951-d872f2087c98
* Disk Cache: Simplify CallbackTest.rvargas@google.com2009-06-094-48/+28
| | | | | | | | | | | Remove the callback id... it's not useful anymore. BUG=none TEST=current unit tests. Review URL: http://codereview.chromium.org/118407 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17924 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Report more info from the current experiment.rvargas@google.com2009-06-053-19/+43
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/119218 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17772 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Interface for the sparse cache support.rvargas@google.com2009-06-045-0/+91
| | | | | | | | | | | | This is just the interface declaration plus a mocked implementation of the interface. BUG=12258 TEST=none Review URL: http://codereview.chromium.org/119072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17669 0039d316-1c4b-4281-b951-d872f2087c98
* Reduce header dependencies in base/phajdan.jr@chromium.org2009-06-031-0/+1
| | | | | | | | Also adds more explicit #includes for needed things. Review URL: http://codereview.chromium.org/118162 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17479 0039d316-1c4b-4281-b951-d872f2087c98
* Remove code path that passes a file handle to the rendererhclam@chromium.org2009-05-297-192/+3
| | | | | | | | | | | | | | | | | | | | | | Since the code now does range request without any caching the code path for passing file handle is not used any more. Changes: 1. Remove response_data_file in webkit_glue::ResourceResponseHead 2. Remove response_data_file in net::ResourceInfo 3. Remove code that passes file handle using IPC 4. Remove code that passes file hadnle from network layer to ResourceDispatcherHost 5. Remove MediaResourceHandler 6. Remove code in disk_cache that expose the file handle 7. Remove ChromeURLRequestContext::CreateOffTheRecordForMedia() so no more OTR request context for media, in OTR mode simply memory cache is used 8. Reset cache size for media cache to default BUG=12249 BUG=12256 Review URL: http://codereview.chromium.org/113931 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17227 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Fix a signed / unsigned comparison on cl 17052rvargas@google.com2009-05-281-2/+2
| | | | | | | | TBR=nsylvain Review URL: http://codereview.chromium.org/115848 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17053 0039d316-1c4b-4281-b951-d872f2087c98