summaryrefslogtreecommitdiffstats
path: root/net/disk_cache/eviction.h
Commit message (Collapse)AuthorAgeFilesLines
* Disk Cache: Remove the deleted list experiment.rvargas@google.com2012-02-231-2/+2
| | | | | | | | BUG=79186 TEST=none Review URL: https://chromiumcodereview.appspot.com/9430030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123279 0039d316-1c4b-4281-b951-d872f2087c98
* Disk Cache: Avoid discarding more deleted entriesrvargas@google.com2011-11-161-0/+1
| | | | | | | | | | than needed. BUG=none TEST=none Review URL: http://codereview.chromium.org/8540027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110217 0039d316-1c4b-4281-b951-d872f2087c98
* base::Bind conversion for net/disk_cache/...adamk@chromium.org2011-10-201-2/+2
| | | | | | | | | R=willchan@chromium.org Review URL: http://codereview.chromium.org/8353019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106415 0039d316-1c4b-4281-b951-d872f2087c98
* Disk Cache: Improve handling of dirty entries.rvargas@google.com2011-09-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | * Split the entry sanity checks in two parts: a critical one and a non-critical one. This allows us to return dirty entries instead of failing to open them. * Make sure that we cannot reach an entry through the index before the actual data reaches the disk (when creating an entry linked through a parent we were not respecting that). * When deleting a block from a block file, first clean it up and then update the map (avoid leaving a dirty free block if there is a crash) * Handle the case of errors when opening entries through the enumerations path. BUG=73102 TEST=net_unittests Review URL: http://codereview.chromium.org/8065015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103323 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Make sure the list of unused entries is notrvargas@google.com2011-05-101-2/+2
| | | | | | | | | | | depleted if we are not reaching the time targets for any of the lists. BUG=79491 TEST=netunittests Review URL: http://codereview.chromium.org/6967006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84877 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Prevent obscure file corruption and dealrvargas@google.com2011-01-251-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | with the result of that corruption. 1. Now we mark any open entry as dirty, even if we are supposed to delete the entry right away because if we crash before that, we may end up clearing the dirty flag of a dirty entry. 2. When we look for a parent of a given entry we now double check that the entry is the one that we want (and not just another entry with the same key). 3. If we have a loop on the hash collision list (result of failing to do 1 and 2 above), we figure that out. 4. Now every time we open an entry from an LRU list we end up using the same code path (with the proper handling of dirty entries). BUG=69135 TEST=net_unittests Review URL: http://codereview.chromium.org/6292011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72563 0039d316-1c4b-4281-b951-d872f2087c98
* Disk Cache: Run another experiment: Increase the numberrvargas@google.com2010-09-131-0/+1
| | | | | | | | | | | | | | | | | of deleted entries that we keep around. I'm doubling the number of deleted entries for about 13% of the dev channed. I'm also adding a few extra histograms. BUG=none TEST=none Review URL: http://codereview.chromium.org/3343010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59243 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Move more ctors/dtors from headers to implementation.erg@google.com2010-09-011-5/+2
| | | | | | | | | | | | | | | | | - Adding/Moving dtors of objects that have CancelableRequestConsumers shaves three megs off browser.a. - Adding/Moving dtors of objects that have ScopedRunnableMethodFactories only shaved 100k off browser.a/renderer.a. - Adding/Moving dtors of objects that used some form of base::*Timer<> was negligible; there were only a few classes that had a Timer but had a ctor/dtor in the header after the previous cleanups. BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3278006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58192 0039d316-1c4b-4281-b951-d872f2087c98
* `#pragma once` for app, base, chrome, gfx, ipc, net, skia, viewsthakis@chromium.org2010-07-261-0/+1
| | | | | | | | | BUG=50273 TEST=everything still builds, build is 10% faster on windows, same speed on mac/linux TBR: erg git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53716 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Stop evictions while performing final cleanup.rvargas@google.com2010-07-201-1/+5
| | | | | | | | | | | | | The evictions code may post tasks for further processing and that is a problem at cache destruction, so add an explicit method to stop evictions. BUG=49547 TEST=none Review URL: http://codereview.chromium.org/2854053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52964 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Delete the disk cache if it is substantially biggerrvargas@google.com2010-02-191-0/+2
| | | | | | | | | | | | | | | | | | than the desired max size, and adjust eviction to avoid having long periods without it. There's a few users with caches that are too big, and it looks like the problem is that eviction could be stopped forever, while still adding new items to the cache. Now we only allow one minute (at a time) with eviction suspended. BUG=none TEST=none Review URL: http://codereview.chromium.org/647054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39407 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Don't evict entries if we are busy doing other stuff.rvargas@google.com2009-07-091-0/+3
| | | | | | | | | 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: Avoid recursion when trimming entries.rvargas@google.com2009-06-101-0/+1
| | | | | | | | | | | | | | 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: Set up a new experiment on the dev channel.rvargas@google.com2009-04-221-0/+1
| | | | | | | | | Enable the new eviction algorithm for 10% of the current users on the dev channel. Review URL: http://codereview.chromium.org/79064 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14229 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: First pass to make it possible to havervargas@google.com2009-03-251-1/+2
| | | | | | | | | | | | multiple instances of BackendImpl. We need multiple objects to be able to support media files on the cache. After this change, histograms will be the only thing that get messed up by multiple disk caches. Review URL: http://codereview.chromium.org/49027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12520 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: First implementation of TrimDeleted() and a fewrvargas@google.com2009-03-181-0/+1
| | | | | | | | | | other fixes related to the new eviction code. As before, almost everything is disabled by default. Review URL: http://codereview.chromium.org/48112 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11995 0039d316-1c4b-4281-b951-d872f2087c98
* New disk cache eviction algorithm (partial implementation).rvargas@google.com2009-03-061-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | Disabled by a #def. When enabled, file format 2.1 is used, with a possible update from ver 2.0. If a version with this code disabled is run after the upgrade, it will just discard the file and go back to 2.0. We now put some of those extra list to use! Entries are separated into various lists depending on how often are used, and we keep track of previously evicted entries. If the new algorithm is not enabled, most of the code just goes through a different path (with the old code instead of the new one). One notable exception is OpenFollowingEntry, used to enumerate the entries on the cache; the code changed significantly to support the new version of the "cache iterator", but functionally should do the same as the current code. Review URL: http://codereview.chromium.org/27345 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11145 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: move eviction code to a separate file.rvargas@google.com2008-12-181-0/+57
There should be no change in behavior with this CL. Review URL: http://codereview.chromium.org/14183 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7190 0039d316-1c4b-4281-b951-d872f2087c98