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

Issue 2648323005: memory coordinator: Add MemoryCoordinatorClient::OnPurgeMemory() (Closed)

Created:
3 years, 11 months ago by bashi
Modified:
3 years, 9 months ago
Reviewers:
hajimehoshi, tasak
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, cbentzel+watch_chromium.org, vmpstr+watch_chromium.org, jam, gavinp+memory_chromium.org, darin-cc_chromium.org, cc-bugs_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

memory coordinator: Add MemoryCoordinatorClient::OnPurgeMemory() Before this CL, MemoryCoordinatorClient has only one callback called OnMemoryStateChange(). Clients try to free up memory when state change happens (e.g. NORMAL -> SUSPENDED). This may not be a good strategy on some platforms because we may touch compressed pages (see [1] for details). This CL separates logic for purging existing memory from memory state changes. This way we can build flexible strategies for handling memory pressure. [1] https://groups.google.com/a/chromium.org/forum/?utm_medium=email&utm_source=footer#!msg/project-trim/s96xSirL2Hs/18uq1zfHEgAJ BUG=684287 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+90 lines, -204 lines) Patch
M base/memory/memory_coordinator_client.h View 3 chunks +26 lines, -17 lines 4 comments Download
M base/memory/memory_coordinator_client_registry.h View 1 chunk +3 lines, -0 lines 0 comments Download
M base/memory/memory_coordinator_client_registry.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M cc/raster/staging_buffer_pool.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/raster/staging_buffer_pool.cc View 1 chunk +4 lines, -18 lines 0 comments Download
M cc/resources/resource_pool.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/resources/resource_pool.cc View 1 chunk +3 lines, -17 lines 0 comments Download
M cc/tiles/gpu_image_decode_cache.h View 1 chunk +1 line, -0 lines 0 comments Download
M cc/tiles/gpu_image_decode_cache.cc View 1 chunk +8 lines, -18 lines 0 comments Download
M cc/tiles/software_image_decode_cache.h View 1 chunk +1 line, -0 lines 0 comments Download
M cc/tiles/software_image_decode_cache.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M components/discardable_memory/service/discardable_shared_memory_manager.h View 1 chunk +1 line, -0 lines 0 comments Download
M components/discardable_memory/service/discardable_shared_memory_manager.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M content/browser/dom_storage/dom_storage_context_wrapper.h View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/dom_storage/dom_storage_context_wrapper.cc View 1 chunk +2 lines, -20 lines 0 comments Download
M content/browser/renderer_host/renderer_frame_manager.h View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/renderer_frame_manager.cc View 1 chunk +2 lines, -15 lines 0 comments Download
M content/renderer/render_thread_impl.h View 2 chunks +1 line, -1 line 0 comments Download
M content/renderer/render_thread_impl.cc View 3 chunks +11 lines, -43 lines 0 comments Download
M net/http/http_network_session.h View 1 chunk +1 line, -1 line 0 comments Download
M net/http/http_network_session.cc View 1 chunk +2 lines, -16 lines 0 comments Download
M net/sdch/sdch_owner.h View 1 chunk +1 line, -1 line 0 comments Download
M net/sdch/sdch_owner.cc View 1 chunk +2 lines, -16 lines 0 comments Download
M net/ssl/ssl_client_session_cache.h View 1 chunk +1 line, -1 line 0 comments Download
M net/ssl/ssl_client_session_cache.cc View 1 chunk +2 lines, -16 lines 0 comments Download

Messages

Total messages: 11 (7 generated)
bashi
tasak@, hajimehoshi@: PTAL? I'll ask OWNERS review if this looks good to you. tasak@: could ...
3 years, 11 months ago (2017-01-24 07:26:40 UTC) #3
tasak
On 2017/01/24 07:26:40, bashi wrote: > tasak@: could you check this doesn't break purge+throttled experiment? ...
3 years, 11 months ago (2017-01-24 08:19:12 UTC) #6
hajimehoshi
lgtm https://codereview.chromium.org/2648323005/diff/1/base/memory/memory_coordinator_client.h File base/memory/memory_coordinator_client.h (right): https://codereview.chromium.org/2648323005/diff/1/base/memory/memory_coordinator_client.h#newcode38 base/memory/memory_coordinator_client.h:38: // optimization but that is not necessary for ...
3 years, 11 months ago (2017-01-24 11:46:31 UTC) #9
bashi
3 years, 11 months ago (2017-01-26 01:05:49 UTC) #10
Thank you for reviews! I'll separate this CL into small ones.

https://codereview.chromium.org/2648323005/diff/1/base/memory/memory_coordina...
File base/memory/memory_coordinator_client.h (right):

https://codereview.chromium.org/2648323005/diff/1/base/memory/memory_coordina...
base/memory/memory_coordinator_client.h:38: // optimization but that is not
necessary for the process to run (e.g.
On 2017/01/24 11:46:31, hajimehoshi wrote:
> 'caches' should be in this line.

Do you mean s/an optimization/optimization caches/ ?

https://codereview.chromium.org/2648323005/diff/1/base/memory/memory_coordina...
base/memory/memory_coordinator_client.h:66: // any memory whose contents can be
reproduced when transitioning out of
On 2017/01/24 11:46:31, hajimehoshi wrote:
> 'the' should be in this line

Could you elaborate a bit more? Where should I add 'the'?

Powered by Google App Engine
This is Rietveld 408576698