Limit dead resource capacity in Blink cache to 50%.
Limit dead resource capacity in Blink cache to 50%.

Blink resource cache distinguishes between live and dead resources depending on
whether clients of the resources are still around.

The cache capacity is defined in terms of total capacity and dead resource
capacity - the part of total capacity that may be consumed by dead resources.

Currently  we explicitly set "max_dead_capacity = capacity;", i.e. we allow
dead resources to potentially consume all of the cache space. While keeping
some dead resources around makes sense from the performance perspective,
allowing them to constitute a majority of cache space makes renderers that are
used for long one-site multiple-pages browsing sessions bloat with resources of
little value.

This patch limits dead resource capacity to 50% of total cache capacity,
putting a cap on dead resource bloat for long-lived renderers.

BUG=260662

Review URL: https://chromiumcodereview.appspot.com/19392003

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@212392 0039d316-1c4b-4281-b951-d872f2087c98

mohamed--abdel-maksoud/chromium.src,jaruba/chromium.src,Just-D/chromium-1,littlstar/chromium.src,mogoweb/chromium-crosswalk,ltilve/chromium,mohamed--abdel-maksoud/chromium.src,ondra-novak/chromium.src,mohamed--abdel-maksoud/chromium.src,littlstar/chromium.src,littlstar/chromium.src,hgl888/chromium-crosswalk,krieger-od/nwjs_chromium.src,markYoungH/chromium.src,dednal/chromium.src,ondra-novak/chromium.src,dednal/chromium.src,Chilledheart/chromium,hgl888/chromium-crosswalk-efl,dednal/chromium.src,crosswalk-project/chromium-crosswalk-efl,mogoweb/chromium-crosswalk,mogoweb/chromium-crosswalk,jaruba/chromium.src,jaruba/chromium.src,ChromiumWebApps/chromium,axinging/chromium-crosswalk,dushu1203/chromium.src,TheTypoMaster/chromium-crosswalk,dushu1203/chromium.src,axinging/chromium-crosswalk,dednal/chromium.src,chuan9/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,markYoungH/chromium.src,fujunwei/chromium-crosswalk,markYoungH/chromium.src,markYoungH/chromium.src,anirudhSK/chromium,dednal/chromium.src,Fireblend/chromium-crosswalk,Pluto-tv/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,patrickm/chromium.src,jaruba/chromium.src,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk,jaruba/chromium.src,axinging/chromium-crosswalk,bright-sparks/chromium-spacewalk,dushu1203/chromium.src,TheTypoMaster/chromium-crosswalk,krieger-od/nwjs_chromium.src,jaruba/chromium.src,dednal/chromium.src,Just-D/chromium-1,ChromiumWebApps/chromium,M4sse/chromium.src,Jonekee/chromium.src,hgl888/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,patrickm/chromium.src,dednal/chromium.src,dushu1203/chromium.src,M4sse/chromium.src,bright-sparks/chromium-spacewalk,mogoweb/chromium-crosswalk,Jonekee/chromium.src,fujunwei/chromium-crosswalk,Pluto-tv/chromium-crosswalk,chuan9/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,Chilledheart/chromium,Jonekee/chromium.src,chuan9/chromium-crosswalk,axinging/chromium-crosswalk,M4sse/chromium.src,Chilledheart/chromium,littlstar/chromium.src,Pluto-tv/chromium-crosswalk,patrickm/chromium.src,axinging/chromium-crosswalk,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,ChromiumWebApps/chromium,markYoungH/chromium.src,bright-sparks/chromium-spacewalk,M4sse/chromium.src,patrickm/chromium.src,dednal/chromium.src,Fireblend/chromium-crosswalk,markYoungH/chromium.src,dushu1203/chromium.src,krieger-od/nwjs_chromium.src,M4sse/chromium.src,hgl888/chromium-crosswalk-efl,chuan9/chromium-crosswalk,anirudhSK/chromium,PeterWangIntel/chromium-crosswalk,ChromiumWebApps/chromium,patrickm/chromium.src,ChromiumWebApps/chromium,Fireblend/chromium-crosswalk,ondra-novak/chromium.src,PeterWangIntel/chromium-crosswalk,Pluto-tv/chromium-crosswalk,anirudhSK/chromium,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk,Jonekee/chromium.src,dushu1203/chromium.src,ltilve/chromium,anirudhSK/chromium,jaruba/chromium.src,mogoweb/chromium-crosswalk,anirudhSK/chromium,ltilve/chromium,patrickm/chromium.src,axinging/chromium-crosswalk,ChromiumWebApps/chromium,chuan9/chromium-crosswalk,axinging/chromium-crosswalk,mogoweb/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,PeterWangIntel/chromium-crosswalk,ChromiumWebApps/chromium,ltilve/chromium,markYoungH/chromium.src,PeterWangIntel/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,krieger-od/nwjs_chromium.src,chuan9/chromium-crosswalk,bright-sparks/chromium-spacewalk,Chilledheart/chromium,dushu1203/chromium.src,dushu1203/chromium.src,M4sse/chromium.src,markYoungH/chromium.src,chuan9/chromium-crosswalk,fujunwei/chromium-crosswalk,Chilledheart/chromium,Just-D/chromium-1,M4sse/chromium.src,dednal/chromium.src,hgl888/chromium-crosswalk,anirudhSK/chromium,mogoweb/chromium-crosswalk,Just-D/chromium-1,fujunwei/chromium-crosswalk,fujunwei/chromium-crosswalk,bright-sparks/chromium-spacewalk,ondra-novak/chromium.src,Fireblend/chromium-crosswalk,Jonekee/chromium.src,ondra-novak/chromium.src,M4sse/chromium.src,TheTypoMaster/chromium-crosswalk,ondra-novak/chromium.src,TheTypoMaster/chromium-crosswalk,axinging/chromium-crosswalk,ChromiumWebApps/chromium,jaruba/chromium.src,crosswalk-project/chromium-crosswalk-efl,M4sse/chromium.src,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,dushu1203/chromium.src,crosswalk-project/chromium-crosswalk-efl,chuan9/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,jaruba/chromium.src,Jonekee/chromium.src,axinging/chromium-crosswalk,hgl888/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,Just-D/chromium-1,krieger-od/nwjs_chromium.src,anirudhSK/chromium,mogoweb/chromium-crosswalk,Chilledheart/chromium,anirudhSK/chromium,bright-sparks/chromium-spacewalk,ltilve/chromium,Just-D/chromium-1,Fireblend/chromium-crosswalk,bright-sparks/chromium-spacewalk,littlstar/chromium.src,Pluto-tv/chromium-crosswalk,dushu1203/chromium.src,hgl888/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,anirudhSK/chromium,Fireblend/chromium-crosswalk,littlstar/chromium.src,Just-D/chromium-1,Jonekee/chromium.src,TheTypoMaster/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Just-D/chromium-1,ondra-novak/chromium.src,PeterWangIntel/chromium-crosswalk,Jonekee/chromium.src,littlstar/chromium.src,TheTypoMaster/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,ChromiumWebApps/chromium,patrickm/chromium.src,krieger-od/nwjs_chromium.src,Chilledheart/chromium,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,anirudhSK/chromium,Chilledheart/chromium,anirudhSK/chromium,ChromiumWebApps/chromium,Jonekee/chromium.src,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk-efl,littlstar/chromium.src,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk-efl,axinging/chromium-crosswalk,krieger-od/nwjs_chromium.src,krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,Fireblend/chromium-crosswalk,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,jaruba/chromium.src,Chilledheart/chromium,fujunwei/chromium-crosswalk,ltilve/chromium,Pluto-tv/chromium-crosswalk,markYoungH/chromium.src,bright-sparks/chromium-spacewalk,Pluto-tv/chromium-crosswalk,anirudhSK/chromium,patrickm/chromium.src,ltilve/chromium,hgl888/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,M4sse/chromium.src,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk,ltilve/chromium,hgl888/chromium-crosswalk,ltilve/chromium,PeterWangIntel/chromium-crosswalk,ondra-novak/chromium.src,dednal/chromium.src,mogoweb/chromium-crosswalk,patrickm/chromium.src,mohamed--abdel-maksoud/chromium.src,mohamed--abdel-maksoud/chromium.src,jaruba/chromium.src,ChromiumWebApps/chromium,fujunwei/chromium-crosswalk,M4sse/chromium.src,hgl888/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,ChromiumWebApps/chromium,crosswalk-project/chromium-crosswalk-efl,dushu1203/chromium.src,markYoungH/chromium.src,ondra-novak/chromium.src,dednal/chromium.src,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk,Just-D/chromium-1,axinging/chromium-crosswalk,Jonekee/chromium.src