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

Issue 513523002: Adding Baseframework of the ResourceManager (all hooks and observers) are being put in place with a… (Closed)

Created:
6 years, 3 months ago by Mr4D (OOO till 08-26)
Modified:
6 years, 3 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam
Project:
chromium
Visibility:
Public.

Description

Adding Baseframework of the ResourceManager (all hooks and observers) are being put in place with a very basic management scheme The current ash implementation of the LowMemoryObserver polls "/dev/chromeos-low-mem" to find if we are running out of memory. After discussion with semenzato@ we decided that that is not precise enough and we should rather poll the system memory information. Going forward this has multiple benefits: 1. it does not require special kernel handling. 2. it also gives us information about GPU memory on chromeOS which will come handy once we are adding more sophisticated management. Beside that, this CL adds the ResourceManager which hooks itself into several components to detect changes in Activity's and their ordering as well as memory pressure. Note: The current management implementation itself is really primitive and needs to be improved. TBR for the DEPS file BUG=381212, 403782 TEST=MemoryPressureTest.*, ResourceManagerTest.* TBR=oshima@chromium.org Committed: https://crrev.com/c8c38693393c172a44abdd18e4232ed1479be9bd Cr-Commit-Position: refs/heads/master@{#292286}

Patch Set 1 #

Patch Set 2 : Self nits #

Total comments: 29

Patch Set 3 : Addressed #

Total comments: 6

Patch Set 4 : Addressed #

Patch Set 5 : rebased #

Patch Set 6 : Odd - DEPS files are not shown by git status. Added. #

Total comments: 2

Patch Set 7 : more DEPS #

Patch Set 8 : Adding comment, fixing unit test and making logging less chatty for unittests #

Patch Set 9 : Aaaand another rebase #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+1125 lines, -5 lines) Patch
M athena/activity/activity_manager_impl.h View 1 2 3 4 2 chunks +7 lines, -0 lines 0 comments Download
M athena/activity/activity_manager_impl.cc View 1 2 3 4 4 chunks +17 lines, -0 lines 0 comments Download
M athena/activity/public/activity_manager.h View 2 chunks +4 lines, -0 lines 0 comments Download
A athena/activity/public/activity_manager_observer.h View 1 chunk +27 lines, -0 lines 0 comments Download
M athena/athena.gyp View 1 2 3 4 5 6 7 8 5 chunks +11 lines, -0 lines 0 comments Download
M athena/content/app_activity.cc View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -1 line 0 comments Download
M athena/content/app_activity_proxy.h View 1 chunk +0 lines, -1 line 0 comments Download
M athena/content/app_activity_proxy.cc View 1 chunk +1 line, -1 line 0 comments Download
M athena/content/app_activity_registry.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -2 lines 0 comments Download
M athena/content/web_activity.cc View 1 2 3 4 2 chunks +6 lines, -1 line 0 comments Download
M athena/home/home_card_impl.cc View 1 2 3 4 2 chunks +4 lines, -0 lines 0 comments Download
M athena/main/DEPS View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M athena/main/athena_launcher.cc View 1 2 3 4 2 chunks +3 lines, -0 lines 0 comments Download
A athena/resource_manager/DEPS View 1 2 3 4 5 6 1 chunk +15 lines, -0 lines 0 comments Download
A + athena/resource_manager/OWNERS View 0 chunks +-1 lines, --1 lines 0 comments Download
A athena/resource_manager/delegate/resource_manager_delegate.cc View 1 2 3 4 5 6 7 1 chunk +50 lines, -0 lines 0 comments Download
A athena/resource_manager/memory_pressure_notifier.h View 1 2 1 chunk +92 lines, -0 lines 0 comments Download
A athena/resource_manager/memory_pressure_notifier.cc View 1 2 1 chunk +65 lines, -0 lines 0 comments Download
A athena/resource_manager/memory_pressure_notifier_unittest.cc View 1 1 chunk +221 lines, -0 lines 0 comments Download
A athena/resource_manager/public/resource_manager.h View 1 2 1 chunk +40 lines, -0 lines 0 comments Download
A athena/resource_manager/public/resource_manager_delegate.h View 1 chunk +33 lines, -0 lines 0 comments Download
A athena/resource_manager/resource_manager_impl.cc View 1 2 3 4 5 6 7 1 chunk +255 lines, -0 lines 0 comments Download
A athena/resource_manager/resource_manager_unittest.cc View 1 2 1 chunk +207 lines, -0 lines 0 comments Download
M athena/test/DEPS View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
A athena/test/test_resource_manager_delegate.cc View 1 2 1 chunk +46 lines, -0 lines 0 comments Download
M athena/wm/public/window_manager_observer.h View 1 chunk +3 lines, -0 lines 1 comment Download
M athena/wm/window_manager_impl.h View 1 chunk +1 line, -0 lines 0 comments Download
M athena/wm/window_manager_impl.cc View 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 36 (1 generated)
Mr4D (OOO till 08-26)
skuhne@chromium.org changed reviewers: + mukai@chromium.org
6 years, 3 months ago (2014-08-26 23:33:29 UTC) #1
Mr4D (OOO till 08-26)
Please have a look!
6 years, 3 months ago (2014-08-26 23:41:32 UTC) #2
Jun Mukai
https://codereview.chromium.org/513523002/diff/20001/athena/resource_manager/memory_pressure_notifier.cc File athena/resource_manager/memory_pressure_notifier.cc (right): https://codereview.chromium.org/513523002/diff/20001/athena/resource_manager/memory_pressure_notifier.cc#newcode24 athena/resource_manager/memory_pressure_notifier.cc:24: class MemoryPressureNotifierImpl You don't have to introduce pimpl pattern ...
6 years, 3 months ago (2014-08-27 01:21:19 UTC) #3
Mr4D (OOO till 08-26)
Addressed! Please have another look! https://codereview.chromium.org/513523002/diff/20001/athena/resource_manager/memory_pressure_notifier.cc File athena/resource_manager/memory_pressure_notifier.cc (right): https://codereview.chromium.org/513523002/diff/20001/athena/resource_manager/memory_pressure_notifier.cc#newcode24 athena/resource_manager/memory_pressure_notifier.cc:24: class MemoryPressureNotifierImpl Done. (Did ...
6 years, 3 months ago (2014-08-27 16:12:14 UTC) #4
Jun Mukai
lgtm with nits https://codereview.chromium.org/513523002/diff/20001/athena/resource_manager/resource_manager.cc File athena/resource_manager/resource_manager.cc (right): https://codereview.chromium.org/513523002/diff/20001/athena/resource_manager/resource_manager.cc#newcode60 athena/resource_manager/resource_manager.cc:60: // for us, we can remove ...
6 years, 3 months ago (2014-08-27 16:57:48 UTC) #5
Mr4D (OOO till 08-26)
Many thanks for your quick review! https://codereview.chromium.org/513523002/diff/40001/athena/athena.gyp File athena/athena.gyp (right): https://codereview.chromium.org/513523002/diff/40001/athena/athena.gyp#newcode156 athena/athena.gyp:156: 'resource_manager/public/resource_manager_delegate.h', On 2014/08/27 ...
6 years, 3 months ago (2014-08-27 18:09:38 UTC) #6
Mr4D (OOO till 08-26)
The CQ bit was checked by skuhne@chromium.org
6 years, 3 months ago (2014-08-27 18:09:43 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skuhne@chromium.org/513523002/60001
6 years, 3 months ago (2014-08-27 18:11:22 UTC) #8
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_gpu on tryserver.chromium.gpu ...
6 years, 3 months ago (2014-08-27 18:26:23 UTC) #9
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 3 months ago (2014-08-27 18:28:05 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: mac_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/mac_gpu/builds/47102) ios_dbg_simulator on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator/builds/9606) ios_rel_device ...
6 years, 3 months ago (2014-08-27 18:28:05 UTC) #11
Mr4D (OOO till 08-26)
The CQ bit was checked by skuhne@chromium.org
6 years, 3 months ago (2014-08-27 18:58:28 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skuhne@chromium.org/513523002/80001
6 years, 3 months ago (2014-08-27 18:59:11 UTC) #13
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_gpu_triggered_tests on tryserver.chromium.gpu ...
6 years, 3 months ago (2014-08-27 20:29:54 UTC) #14
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 3 months ago (2014-08-27 20:33:14 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/7090) ios_rel_device_ninja on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_rel_device_ninja/builds/6531)
6 years, 3 months ago (2014-08-27 20:33:15 UTC) #16
Mr4D (OOO till 08-26)
The CQ bit was checked by skuhne@chromium.org
6 years, 3 months ago (2014-08-27 20:48:05 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skuhne@chromium.org/513523002/100001
6 years, 3 months ago (2014-08-27 20:49:14 UTC) #18
Mr4D (OOO till 08-26)
The CQ bit was checked by skuhne@chromium.org
6 years, 3 months ago (2014-08-27 21:11:15 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skuhne@chromium.org/513523002/120001
6 years, 3 months ago (2014-08-27 21:12:51 UTC) #20
Luigi Semenzato
On 2014/08/27 21:12:51, I haz the power (commit-bot) wrote: > CQ is trying da patch. ...
6 years, 3 months ago (2014-08-27 21:23:55 UTC) #21
Luigi Semenzato
semenzato@chromium.org changed reviewers: + semenzato@chromium.org
6 years, 3 months ago (2014-08-27 21:24:08 UTC) #22
Luigi Semenzato
https://codereview.chromium.org/513523002/diff/100001/athena/resource_manager/delegate/resource_manager_delegate.cc File athena/resource_manager/delegate/resource_manager_delegate.cc (right): https://codereview.chromium.org/513523002/diff/100001/athena/resource_manager/delegate/resource_manager_delegate.cc#newcode31 athena/resource_manager/delegate/resource_manager_delegate.cc:31: return ((memory.total - memory.free) * 100) / memory.total; Is ...
6 years, 3 months ago (2014-08-27 21:24:08 UTC) #23
Mr4D (OOO till 08-26)
The CQ bit was unchecked by skuhne@chromium.org
6 years, 3 months ago (2014-08-27 22:14:51 UTC) #24
Mr4D (OOO till 08-26)
Okay. Will address the memory calculation in a separate patch. For the long term usage ...
6 years, 3 months ago (2014-08-27 22:34:01 UTC) #25
Mr4D (OOO till 08-26)
The CQ bit was checked by skuhne@chromium.org
6 years, 3 months ago (2014-08-27 22:34:10 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skuhne@chromium.org/513523002/140001
6 years, 3 months ago (2014-08-27 22:35:45 UTC) #27
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_arm64_dbg_recipe on tryserver.chromium.linux ...
6 years, 3 months ago (2014-08-27 23:36:07 UTC) #28
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 3 months ago (2014-08-27 23:39:35 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_dbg_recipe on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_arm64_dbg_recipe/builds/943) android_clang_dbg on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_clang_dbg/builds/10429)
6 years, 3 months ago (2014-08-27 23:39:37 UTC) #30
Mr4D (OOO till 08-26)
The CQ bit was checked by skuhne@chromium.org
6 years, 3 months ago (2014-08-27 23:47:51 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skuhne@chromium.org/513523002/160001
6 years, 3 months ago (2014-08-27 23:48:34 UTC) #32
commit-bot: I haz the power
Committed patchset #9 (id:160001) as 06da2746706f7168ccb69923bac1237957b12297
6 years, 3 months ago (2014-08-28 00:47:48 UTC) #33
oshima
https://codereview.chromium.org/513523002/diff/160001/athena/wm/public/window_manager_observer.h File athena/wm/public/window_manager_observer.h (right): https://codereview.chromium.org/513523002/diff/160001/athena/wm/public/window_manager_observer.h#newcode23 athena/wm/public/window_manager_observer.h:23: virtual void OnActivityOrderHasChanged() = 0; FYI: WM should not ...
6 years, 3 months ago (2014-09-03 22:12:30 UTC) #35
commit-bot: I haz the power
6 years, 3 months ago (2014-09-10 02:56:15 UTC) #36
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/c8c38693393c172a44abdd18e4232ed1479be9bd
Cr-Commit-Position: refs/heads/master@{#292286}

Powered by Google App Engine
This is Rietveld 408576698