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

Issue 2552153002: [BlobStorage] Enabling disk paging and direct storage. (Closed)

Created:
4 years ago by dmurph
Modified:
3 years, 11 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[BlobStorage] Enabling disk paging and direct storage. Adds disk configuration calculations that are slightly specialized for Android, ChromeOS, and general desktop. The max memory space and disk spaced are set based on the total RAM and disk of the device. BUG=375297 Review-Url: https://codereview.chromium.org/2552153002 Cr-Commit-Position: refs/heads/master@{#443139} Committed: https://chromium.googlesource.com/chromium/src/+/bf104bd8baf5e73b71c82ba60249cb778b8db099

Patch Set 1 #

Total comments: 8

Patch Set 2 : Added test & fix for memory controller paging too much #

Patch Set 3 : Added detection for getting close to disk full, and disk usage freezing #

Total comments: 2

Patch Set 4 : Added an early-exit clause so files don't get created unnecessarily #

Total comments: 12

Patch Set 5 : Added min disk availibility and adjustment of storage limits when approach (and leaving) disk limits #

Patch Set 6 : forgot some comments #

Total comments: 10

Patch Set 7 : build fix, adding UMA metrics #

Total comments: 8

Patch Set 8 : test fix, and comments #

Patch Set 9 : fixed windows build #

Total comments: 12

Patch Set 10 : Marijn's comments #

Patch Set 11 : rebase #

Patch Set 12 : Disk space getter is now a func ptr #

Total comments: 16

Patch Set 13 : Fixed & added test for disk quota near min_available, and comments #

Total comments: 2

Patch Set 14 : Marijn's comments #

Total comments: 14

Patch Set 15 : Comments from Mark #

Total comments: 13

Patch Set 16 : Mark's comment #

Patch Set 17 : added comments to WebContentsImplTest #

Unified diffs Side-by-side diffs Delta from patch set Stats (+888 lines, -70 lines) Patch
M content/browser/blob_storage/blob_dispatcher_host_unittest.cc View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/blob_storage/blob_flattener_unittest.cc View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/blob_storage/blob_memory_controller_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 16 chunks +449 lines, -6 lines 0 comments Download
M content/browser/blob_storage/blob_storage_browsertest.cc View 1 2 3 4 5 6 2 chunks +3 lines, -2 lines 0 comments Download
M content/browser/blob_storage/blob_storage_context_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/blob_storage/blob_transport_host_unittest.cc View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/blob_storage/chrome_blob_storage_context.cc View 1 2 3 4 5 6 3 chunks +11 lines, -1 line 0 comments Download
M content/browser/web_contents/web_contents_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +9 lines, -0 lines 0 comments Download
M storage/browser/blob/blob_memory_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +34 lines, -2 lines 0 comments Download
M storage/browser/blob/blob_memory_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 23 chunks +281 lines, -47 lines 0 comments Download
M storage/browser/blob/blob_storage_context.h View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M storage/common/blob_storage/blob_storage_constants.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +28 lines, -8 lines 0 comments Download
M storage/common/blob_storage/blob_storage_constants.cc View 1 2 3 4 5 6 1 chunk +14 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +49 lines, -0 lines 0 comments Download

Messages

Total messages: 100 (62 generated)
dmurph
Hello Josh, Michael, and Victor: Can you PTAL at this change? It enables disk for ...
4 years ago (2016-12-06 02:20:06 UTC) #2
dmurph
+kinuko for knowledge, and FYI
4 years ago (2016-12-06 18:47:07 UTC) #4
dmurph
+mek as well for knowledge, FYI, and review
4 years ago (2016-12-06 20:58:13 UTC) #6
michaeln
https://codereview.chromium.org/2552153002/diff/1/storage/browser/blob/blob_memory_controller.cc File storage/browser/blob/blob_memory_controller.cc (right): https://codereview.chromium.org/2552153002/diff/1/storage/browser/blob/blob_memory_controller.cc#newcode53 storage/browser/blob/blob_memory_controller.cc:53: // * Disk - 10% hmmm... i'm not sure ...
4 years ago (2016-12-06 21:58:23 UTC) #7
dmurph
https://codereview.chromium.org/2552153002/diff/1/storage/browser/blob/blob_memory_controller.cc File storage/browser/blob/blob_memory_controller.cc (right): https://codereview.chromium.org/2552153002/diff/1/storage/browser/blob/blob_memory_controller.cc#newcode53 storage/browser/blob/blob_memory_controller.cc:53: // * Disk - 10% On 2016/12/06 21:58:23, michaeln ...
4 years ago (2016-12-06 22:12:44 UTC) #8
michaeln
https://codereview.chromium.org/2552153002/diff/1/storage/browser/blob/blob_memory_controller.cc File storage/browser/blob/blob_memory_controller.cc (right): https://codereview.chromium.org/2552153002/diff/1/storage/browser/blob/blob_memory_controller.cc#newcode53 storage/browser/blob/blob_memory_controller.cc:53: // * Disk - 10% On 2016/12/06 22:12:43, dmurph ...
4 years ago (2016-12-06 23:11:25 UTC) #9
dmurph
https://codereview.chromium.org/2552153002/diff/1/storage/browser/blob/blob_memory_controller.cc File storage/browser/blob/blob_memory_controller.cc (right): https://codereview.chromium.org/2552153002/diff/1/storage/browser/blob/blob_memory_controller.cc#newcode53 storage/browser/blob/blob_memory_controller.cc:53: // * Disk - 10% On 2016/12/06 23:11:25, michaeln ...
4 years ago (2016-12-06 23:20:50 UTC) #10
jsbell
Just a couple of nits about comments. Haven't actually read the CL yet. https://codereview.chromium.org/2552153002/diff/1/storage/browser/blob/blob_memory_controller.cc File ...
4 years ago (2016-12-07 00:01:24 UTC) #11
dmurph
Another note: On ChromeOS, we're measuring the disk size of the 'stateful' partition - the ...
4 years ago (2016-12-08 00:26:16 UTC) #12
dmurph
@all, please take a look! I added disk-almost-full detection! Much better experience! No breakage! woot! ...
4 years ago (2016-12-08 20:05:32 UTC) #15
michaeln
i've got some questions about it, but i think this looks like a good approach ...
4 years ago (2016-12-08 21:17:33 UTC) #20
pwnall
https://codereview.chromium.org/2552153002/diff/60001/storage/browser/blob/blob_memory_controller.cc File storage/browser/blob/blob_memory_controller.cc (right): https://codereview.chromium.org/2552153002/diff/60001/storage/browser/blob/blob_memory_controller.cc#newcode48 storage/browser/blob/blob_memory_controller.cc:48: // CrOS: Can you please add explanations of where ...
4 years ago (2016-12-08 21:59:25 UTC) #21
dmurph
@mek, @pwnall, can you PTAL? Michael is OOO this week. I updated the system to ...
4 years ago (2016-12-20 02:21:36 UTC) #26
pwnall
Here are some quick thoughts. https://codereview.chromium.org/2552153002/diff/100001/storage/browser/blob/blob_memory_controller.cc File storage/browser/blob/blob_memory_controller.cc (right): https://codereview.chromium.org/2552153002/diff/100001/storage/browser/blob/blob_memory_controller.cc#newcode42 storage/browser/blob/blob_memory_controller.cc:42: const int64_t kUnknownDiskAvailability = ...
4 years ago (2016-12-20 23:09:09 UTC) #33
Marijn Kruisselbrink
https://codereview.chromium.org/2552153002/diff/120001/content/browser/blob_storage/blob_memory_controller_unittest.cc File content/browser/blob_storage/blob_memory_controller_unittest.cc (right): https://codereview.chromium.org/2552153002/diff/120001/content/browser/blob_storage/blob_memory_controller_unittest.cc#newcode875 content/browser/blob_storage/blob_memory_controller_unittest.cc:875: EXPECT_CALL(mock_disk_space, AmountOfFreeDiskSpace()) It seems a bit overkill to use ...
4 years ago (2016-12-21 17:40:37 UTC) #35
dmurph
Thanks! The tests should be fixed as well This was causing an issue with a ...
4 years ago (2016-12-21 22:27:58 UTC) #38
Marijn Kruisselbrink
looks good, just some minor nits https://codereview.chromium.org/2552153002/diff/160001/content/browser/blob_storage/blob_memory_controller_unittest.cc File content/browser/blob_storage/blob_memory_controller_unittest.cc (right): https://codereview.chromium.org/2552153002/diff/160001/content/browser/blob_storage/blob_memory_controller_unittest.cc#newcode45 content/browser/blob_storage/blob_memory_controller_unittest.cc:45: virtual ~MockDiskSpaceTestGetter() {} ...
3 years, 11 months ago (2017-01-05 22:32:23 UTC) #45
dmurph
Thanks for the comments! Michael & Victor, can you PTAL? https://codereview.chromium.org/2552153002/diff/160001/content/browser/blob_storage/blob_memory_controller_unittest.cc File content/browser/blob_storage/blob_memory_controller_unittest.cc (right): https://codereview.chromium.org/2552153002/diff/160001/content/browser/blob_storage/blob_memory_controller_unittest.cc#newcode45 ...
3 years, 11 months ago (2017-01-05 23:21:24 UTC) #48
michaeln
lgtm https://codereview.chromium.org/2552153002/diff/160001/storage/browser/blob/blob_memory_controller.cc File storage/browser/blob/blob_memory_controller.cc (right): https://codereview.chromium.org/2552153002/diff/160001/storage/browser/blob/blob_memory_controller.cc#newcode152 storage/browser/blob/blob_memory_controller.cc:152: free_disk_space = base::SysInfo::AmountOfFreeDiskSpace(blob_storage_dir); nit: might be nice to ...
3 years, 11 months ago (2017-01-06 20:58:53 UTC) #51
dmurph
Thanks! +mpearson for histograms review. https://codereview.chromium.org/2552153002/diff/160001/storage/browser/blob/blob_memory_controller.cc File storage/browser/blob/blob_memory_controller.cc (right): https://codereview.chromium.org/2552153002/diff/160001/storage/browser/blob/blob_memory_controller.cc#newcode152 storage/browser/blob/blob_memory_controller.cc:152: free_disk_space = base::SysInfo::AmountOfFreeDiskSpace(blob_storage_dir); On ...
3 years, 11 months ago (2017-01-06 22:24:30 UTC) #55
Mark P
https://codereview.chromium.org/2552153002/diff/220001/storage/browser/blob/blob_memory_controller.cc File storage/browser/blob/blob_memory_controller.cc (right): https://codereview.chromium.org/2552153002/diff/220001/storage/browser/blob/blob_memory_controller.cc#newcode89 storage/browser/blob/blob_memory_controller.cc:89: UMA_HISTOGRAM_COUNTS_1M("Storage.Blob.MaxDiskSpace", Per my data logging tech talk, I'm always ...
3 years, 11 months ago (2017-01-07 00:07:58 UTC) #58
pwnall
Here a few more small comments. FWIW, michaeln's first function pointer suggestion really nailed the ...
3 years, 11 months ago (2017-01-07 00:46:21 UTC) #59
dmurph
Thanks! I replied to comments inline, PTAL. https://codereview.chromium.org/2552153002/diff/220001/content/browser/blob_storage/blob_memory_controller_unittest.cc File content/browser/blob_storage/blob_memory_controller_unittest.cc (right): https://codereview.chromium.org/2552153002/diff/220001/content/browser/blob_storage/blob_memory_controller_unittest.cc#newcode30 content/browser/blob_storage/blob_memory_controller_unittest.cc:30: using ::testing::StrictMock; ...
3 years, 11 months ago (2017-01-07 02:26:26 UTC) #62
Marijn Kruisselbrink
lgtm https://codereview.chromium.org/2552153002/diff/240001/content/browser/blob_storage/blob_memory_controller_unittest.cc File content/browser/blob_storage/blob_memory_controller_unittest.cc (right): https://codereview.chromium.org/2552153002/diff/240001/content/browser/blob_storage/blob_memory_controller_unittest.cc#newcode20 content/browser/blob_storage/blob_memory_controller_unittest.cc:20: #include "testing/gmock/include/gmock/gmock.h" nit: You're no longer using gmock ...
3 years, 11 months ago (2017-01-10 21:41:06 UTC) #65
dmurph
Thanks! mpearson & pwnall: Can you PTAL? https://codereview.chromium.org/2552153002/diff/240001/content/browser/blob_storage/blob_memory_controller_unittest.cc File content/browser/blob_storage/blob_memory_controller_unittest.cc (right): https://codereview.chromium.org/2552153002/diff/240001/content/browser/blob_storage/blob_memory_controller_unittest.cc#newcode20 content/browser/blob_storage/blob_memory_controller_unittest.cc:20: #include "testing/gmock/include/gmock/gmock.h" ...
3 years, 11 months ago (2017-01-10 21:49:20 UTC) #68
Mark P
Sorry for the delay. Too many other reviews (mostly design docs and experiments)... --mark https://codereview.chromium.org/2552153002/diff/260001/storage/browser/blob/blob_memory_controller.cc ...
3 years, 11 months ago (2017-01-10 23:57:00 UTC) #71
dmurph
Thanks Mark! That was helpful, I hope I clarified things w/ the variable name change ...
3 years, 11 months ago (2017-01-11 01:49:22 UTC) #74
Mark P
metrics lgtm with a number of comments to still wrap up --mark https://codereview.chromium.org/2552153002/diff/260001/storage/browser/blob/blob_memory_controller.cc File storage/browser/blob/blob_memory_controller.cc ...
3 years, 11 months ago (2017-01-11 17:49:14 UTC) #77
dmurph
Thanks! https://codereview.chromium.org/2552153002/diff/260001/storage/browser/blob/blob_memory_controller.cc File storage/browser/blob/blob_memory_controller.cc (right): https://codereview.chromium.org/2552153002/diff/260001/storage/browser/blob/blob_memory_controller.cc#newcode712 storage/browser/blob/blob_memory_controller.cc:712: if (curr_status != ADJUSTED) { On 2017/01/11 17:49:14, ...
3 years, 11 months ago (2017-01-11 18:25:29 UTC) #78
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2552153002/300001
3 years, 11 months ago (2017-01-11 18:36:12 UTC) #81
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/339716)
3 years, 11 months ago (2017-01-11 18:44:16 UTC) #83
dmurph
+boliu for content/browser/web_contents/web_contents_impl_unittest.cc
3 years, 11 months ago (2017-01-11 19:35:11 UTC) #85
boliu
On 2017/01/11 19:35:11, dmurph wrote: > +boliu for content/browser/web_contents/web_contents_impl_unittest.cc lgtm
3 years, 11 months ago (2017-01-11 19:50:24 UTC) #88
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2552153002/320001
3 years, 11 months ago (2017-01-11 19:54:14 UTC) #92
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/211235)
3 years, 11 months ago (2017-01-11 20:08:24 UTC) #94
Mark P
https://codereview.chromium.org/2552153002/diff/280001/storage/browser/blob/blob_memory_controller.h File storage/browser/blob/blob_memory_controller.h (right): https://codereview.chromium.org/2552153002/diff/280001/storage/browser/blob/blob_memory_controller.h#newcode185 storage/browser/blob/blob_memory_controller.h:185: // This should only be called once per storage ...
3 years, 11 months ago (2017-01-11 20:45:24 UTC) #95
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2552153002/320001
3 years, 11 months ago (2017-01-12 00:28:40 UTC) #97
commit-bot: I haz the power
3 years, 11 months ago (2017-01-12 03:51:17 UTC) #100
Message was sent while issue was closed.
Committed patchset #17 (id:320001) as
https://chromium.googlesource.com/chromium/src/+/bf104bd8baf5e73b71c82ba60249...

Powered by Google App Engine
This is Rietveld 408576698