Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(332)

Issue 1476123002: Bounce all requests off the cache lock after 25ms. (Closed)

Created:
5 years ago by davidben
Modified:
4 years, 7 months ago
Reviewers:
mmenke
CC:
chromium-reviews, cbentzel+watch_chromium.org, gavinp+disk_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Bounce all requests off the cache lock after 25ms. The cache lock keeps causing us problems and the existing 20 second timeout is too long to be useful, so we have the worst of both worlds. However, UMA reports that we only ever go beyond 25ms 0.89% of the time over the past 28 days. (See HttpCache.EntryLockWait.) Extend the range request 25ms hack to all requests. This should more usefully mitigate the various deadlocks and priority inversions and worse (fetch() means mutually-distrusting origins can lock each other out of a resource) until a better design is prioritized. BUG=472740, 6697, 458620, 535793 TEST=load https://expired.badssl.com in two tabs. Both should load.

Patch Set 1 #

Total comments: 4

Patch Set 2 : fix comment #

Patch Set 3 : mmenke comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+25 lines, -55 lines) Patch
M net/http/http_cache.h View 1 2 2 chunks +0 lines, -7 lines 0 comments Download
M net/http/http_cache.cc View 1 2 2 chunks +0 lines, -3 lines 0 comments Download
M net/http/http_cache_transaction.h View 1 2 2 chunks +0 lines, -6 lines 0 comments Download
M net/http/http_cache_transaction.cc View 1 2 2 chunks +23 lines, -29 lines 0 comments Download
M net/http/http_cache_unittest.cc View 1 2 1 chunk +2 lines, -3 lines 0 comments Download
M net/http/mock_http_cache.h View 1 2 1 chunk +0 lines, -3 lines 0 comments Download
M net/http/mock_http_cache.cc View 1 2 1 chunk +0 lines, -4 lines 0 comments Download

Messages

Total messages: 9 (4 generated)
mmenke
https://codereview.chromium.org/1476123002/diff/1/net/http/http_cache_transaction.cc File net/http/http_cache_transaction.cc (right): https://codereview.chromium.org/1476123002/diff/1/net/http/http_cache_transaction.cc#newcode1170 net/http/http_cache_transaction.cc:1170: if (bypass_lock_for_test_) { I think we can get rid ...
5 years ago (2015-11-25 20:55:39 UTC) #4
davidben
https://codereview.chromium.org/1476123002/diff/1/net/http/http_cache_transaction.cc File net/http/http_cache_transaction.cc (right): https://codereview.chromium.org/1476123002/diff/1/net/http/http_cache_transaction.cc#newcode1170 net/http/http_cache_transaction.cc:1170: if (bypass_lock_for_test_) { On 2015/11/25 20:55:39, mmenke wrote: > ...
5 years ago (2015-11-25 21:27:39 UTC) #5
mmenke
LGTM, but should also be reviewed by someone more familiar with the cache code.
5 years ago (2015-11-25 22:09:26 UTC) #6
mmenke
Removing myself as reviewer from this one... Too many pending reviews
4 years, 7 months ago (2016-05-17 18:49:41 UTC) #7
davidben
4 years, 7 months ago (2016-05-17 18:59:54 UTC) #9
Closing this issue anyway. This is going to need something cleverer to avoid the
time travel issue Ricardo mentioned.

Powered by Google App Engine
This is Rietveld 408576698