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

Issue 807303002: base: Add free list implementation to browser-wide discardable memory system. (Closed)

Created:
6 years ago by reveman
Modified:
5 years, 12 months ago
CC:
chromium-reviews, darin-cc_chromium.org, erikwright+watch_chromium.org, jam, gavinp+memory_chromium.org, scherkus (not reviewing)
Base URL:
https://chromium.googlesource.com/chromium/src.git@discardable-shared-memory-ashmem
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

base: Add free list implementation to browser-wide discardable memory system. This adds a free list to the browser-wide discardable memory manager in child processes. This reduces the number of open file descriptors and improves performance significantly by avoiding a lot of browser process round-trips. Address-ordered best-fit policy is currently used as it is more likely to result in fewer locked segments but the policy can easily be adjusted if needed. BUG=429415 TEST=content_unittests --gtest_filter=DiscardableSharedMemoryHeapTest.* Committed: https://crrev.com/94ff17c7b04f1e3abfb33c91a2e8ebb70b6882ca Cr-Commit-Position: refs/heads/master@{#309595}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : ready for review #

Patch Set 4 : add comment #

Total comments: 4

Patch Set 5 : rebase #

Total comments: 4

Patch Set 6 : win build fix #

Patch Set 7 : fix nits #

Total comments: 8

Patch Set 8 : address review feedback #

Total comments: 2

Patch Set 9 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+600 lines, -29 lines) Patch
M base/memory/discardable_memory_shmem.h View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M base/memory/discardable_memory_shmem.cc View 1 chunk +10 lines, -12 lines 0 comments Download
M base/memory/discardable_memory_shmem_allocator.h View 2 chunks +14 lines, -3 lines 0 comments Download
M base/memory/discardable_memory_shmem_allocator.cc View 1 2 3 4 5 6 7 8 1 chunk +24 lines, -4 lines 0 comments Download
M content/child/child_discardable_shared_memory_manager.h View 1 2 2 chunks +14 lines, -2 lines 0 comments Download
M content/child/child_discardable_shared_memory_manager.cc View 1 2 3 1 chunk +131 lines, -1 line 0 comments Download
A content/common/discardable_shared_memory_heap.h View 1 2 3 4 5 6 1 chunk +95 lines, -0 lines 0 comments Download
A content/common/discardable_shared_memory_heap.cc View 1 2 3 4 5 6 7 1 chunk +169 lines, -0 lines 0 comments Download
A content/common/discardable_shared_memory_heap_unittest.cc View 1 chunk +133 lines, -0 lines 0 comments Download
M content/common/host_discardable_shared_memory_manager.h View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M content/common/host_discardable_shared_memory_manager.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -3 lines 0 comments Download
M content/content_common.gypi View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 24 (7 generated)
reveman
Please take a look.
6 years ago (2014-12-17 21:58:59 UTC) #2
Avi (use Gerrit)
lgtm Nits, really. https://codereview.chromium.org/807303002/diff/60001/content/common/discardable_shared_memory_heap.h File content/common/discardable_shared_memory_heap.h (right): https://codereview.chromium.org/807303002/diff/60001/content/common/discardable_shared_memory_heap.h#newcode60 content/common/discardable_shared_memory_heap.h:60: // Merge |span| into the free ...
6 years ago (2014-12-18 20:49:07 UTC) #3
reveman
+danakj for base/ To give both of you an idea of where all this is ...
6 years ago (2014-12-18 21:30:44 UTC) #5
danakj
https://codereview.chromium.org/807303002/diff/120001/base/memory/discardable_memory_shmem.cc File base/memory/discardable_memory_shmem.cc (right): https://codereview.chromium.org/807303002/diff/120001/base/memory/discardable_memory_shmem.cc#newcode110 base/memory/discardable_memory_shmem.cc:110: DCHECK(!is_locked_); Why no chunk_->Purge()? https://codereview.chromium.org/807303002/diff/120001/base/memory/discardable_memory_shmem.h File base/memory/discardable_memory_shmem.h (right): https://codereview.chromium.org/807303002/diff/120001/base/memory/discardable_memory_shmem.h#newcode43 ...
6 years ago (2014-12-18 21:40:50 UTC) #6
reveman
https://codereview.chromium.org/807303002/diff/120001/base/memory/discardable_memory_shmem.cc File base/memory/discardable_memory_shmem.cc (right): https://codereview.chromium.org/807303002/diff/120001/base/memory/discardable_memory_shmem.cc#newcode110 base/memory/discardable_memory_shmem.cc:110: DCHECK(!is_locked_); On 2014/12/18 21:40:50, danakj wrote: > Why no ...
6 years ago (2014-12-19 00:49:54 UTC) #7
danakj
https://codereview.chromium.org/807303002/diff/120001/base/memory/discardable_memory_shmem.h File base/memory/discardable_memory_shmem.h (right): https://codereview.chromium.org/807303002/diff/120001/base/memory/discardable_memory_shmem.h#newcode43 base/memory/discardable_memory_shmem.h:43: scoped_ptr<DiscardableMemoryShmemChunk> chunk_; On 2014/12/19 00:49:54, reveman wrote: > On ...
6 years ago (2014-12-19 21:08:09 UTC) #8
reveman
https://codereview.chromium.org/807303002/diff/120001/base/memory/discardable_memory_shmem.h File base/memory/discardable_memory_shmem.h (right): https://codereview.chromium.org/807303002/diff/120001/base/memory/discardable_memory_shmem.h#newcode43 base/memory/discardable_memory_shmem.h:43: scoped_ptr<DiscardableMemoryShmemChunk> chunk_; On 2014/12/19 21:08:08, danakj wrote: > On ...
6 years ago (2014-12-19 22:16:03 UTC) #9
danakj
https://codereview.chromium.org/807303002/diff/140001/base/memory/discardable_memory_shmem_allocator.cc File base/memory/discardable_memory_shmem_allocator.cc (right): https://codereview.chromium.org/807303002/diff/140001/base/memory/discardable_memory_shmem_allocator.cc#newcode42 base/memory/discardable_memory_shmem_allocator.cc:42: scoped_ptr<DiscardableSharedMemory> memory(new DiscardableSharedMemory); Where is there a linked_ptr here?
6 years ago (2014-12-19 22:19:18 UTC) #10
reveman
https://codereview.chromium.org/807303002/diff/140001/base/memory/discardable_memory_shmem_allocator.cc File base/memory/discardable_memory_shmem_allocator.cc (right): https://codereview.chromium.org/807303002/diff/140001/base/memory/discardable_memory_shmem_allocator.cc#newcode42 base/memory/discardable_memory_shmem_allocator.cc:42: scoped_ptr<DiscardableSharedMemory> memory(new DiscardableSharedMemory); On 2014/12/19 22:19:18, danakj wrote: > ...
6 years ago (2014-12-19 23:20:26 UTC) #11
danakj
Ohh I see. Sorry I didn't go and read the content/ code I was assuming ...
5 years, 12 months ago (2014-12-23 17:45:21 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/807303002/140001
5 years, 12 months ago (2014-12-23 17:53:10 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_dbg on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromium_gn_compile_dbg/builds/28550) android_compile_rel on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_compile_rel/builds/2150) chromium_presubmit ...
5 years, 12 months ago (2014-12-23 17:59:33 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/807303002/160001
5 years, 12 months ago (2014-12-23 19:23:53 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/11052)
5 years, 12 months ago (2014-12-23 21:11:31 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/807303002/160001
5 years, 12 months ago (2014-12-23 22:33:38 UTC) #22
commit-bot: I haz the power
Committed patchset #9 (id:160001)
5 years, 12 months ago (2014-12-24 00:52:58 UTC) #23
commit-bot: I haz the power
5 years, 12 months ago (2014-12-24 00:53:52 UTC) #24
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/94ff17c7b04f1e3abfb33c91a2e8ebb70b6882ca
Cr-Commit-Position: refs/heads/master@{#309595}

Powered by Google App Engine
This is Rietveld 408576698