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

Issue 1250093006: Added memory pressure monitor for linux. (Closed)

Created:
5 years, 5 months ago by proberge
Modified:
4 years, 10 months ago
Reviewers:
chrisha
CC:
chromium-reviews, darin-cc_chromium.org, erikwright+watch_chromium.org, jam, gavinp+memory_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Added memory pressure monitor for linux. Note that I don't know much about linux memory usage. The chromeos version considered the virtual z(ram) in the total memory and the file memory as easily reclaimable in the available memory. I removed those. Methodology: added some debug logging and filled /dev/shm/ until chrome crashed (The percentage returned by GetusedMemoryInPercent was 98% at that point). BUG=

Patch Set 1 #

Patch Set 2 : Re-upload with less restrictive copy detection. #

Total comments: 10

Patch Set 3 : Address comments on #2 without refactor #

Patch Set 4 : Remove per-os .h files, merge into a single .h file with #if defined statements. #

Patch Set 5 : Uncomment ::Get functionality #

Unified diffs Side-by-side diffs Delta from patch set Stats (+332 lines, -543 lines) Patch
M base/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M base/base.gyp View 1 chunk +1 line, -0 lines 0 comments Download
M base/base.gypi View 1 2 3 1 chunk +1 line, -3 lines 0 comments Download
M base/memory/BUILD.gn View 1 2 3 1 chunk +1 line, -3 lines 0 comments Download
M base/memory/memory_pressure_monitor.h View 1 2 3 4 2 chunks +249 lines, -5 lines 0 comments Download
M base/memory/memory_pressure_monitor.cc View 1 2 3 4 1 chunk +2 lines, -14 lines 0 comments Download
D base/memory/memory_pressure_monitor_chromeos.h View 1 2 3 1 chunk +0 lines, -119 lines 0 comments Download
M base/memory/memory_pressure_monitor_chromeos.cc View 1 2 3 4 5 chunks +7 lines, -9 lines 0 comments Download
M base/memory/memory_pressure_monitor_chromeos_unittest.cc View 1 2 3 3 chunks +1 line, -3 lines 0 comments Download
A + base/memory/memory_pressure_monitor_linux.cc View 1 2 3 4 5 chunks +41 lines, -144 lines 0 comments Download
A + base/memory/memory_pressure_monitor_linux_unittest.cc View 1 2 3 6 chunks +7 lines, -15 lines 0 comments Download
D base/memory/memory_pressure_monitor_mac.h View 1 2 3 1 chunk +0 lines, -63 lines 0 comments Download
M base/memory/memory_pressure_monitor_mac.cc View 1 2 3 4 5 chunks +6 lines, -3 lines 0 comments Download
M base/memory/memory_pressure_monitor_mac_unittest.cc View 1 2 3 2 chunks +1 line, -3 lines 0 comments Download
D base/memory/memory_pressure_monitor_win.h View 1 2 3 1 chunk +0 lines, -144 lines 0 comments Download
M base/memory/memory_pressure_monitor_win.cc View 1 2 3 4 4 chunks +7 lines, -3 lines 0 comments Download
M base/memory/memory_pressure_monitor_win_unittest.cc View 1 2 3 3 chunks +1 line, -3 lines 0 comments Download
M content/browser/browser_main_loop.cc View 1 2 3 5 chunks +6 lines, -9 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 11 (1 generated)
proberge
5 years, 5 months ago (2015-07-23 20:49:14 UTC) #2
chrisha
https://codereview.chromium.org/1250093006/diff/20001/base/memory/memory_pressure_monitor_linux.cc File base/memory/memory_pressure_monitor_linux.cc (left): https://codereview.chromium.org/1250093006/diff/20001/base/memory/memory_pressure_monitor_linux.cc#oldcode258 base/memory/memory_pressure_monitor_linux.cc:258: int file_memory = info.active_file + info.inactive_file; Is this not ...
5 years, 5 months ago (2015-07-24 13:25:46 UTC) #3
proberge
Addressed the comments on the .cc file, currently working on refactoring as per comments on ...
5 years, 5 months ago (2015-07-24 14:37:37 UTC) #4
proberge
https://codereview.chromium.org/1250093006/diff/20001/base/memory/memory_pressure_monitor_linux.h File base/memory/memory_pressure_monitor_linux.h (right): https://codereview.chromium.org/1250093006/diff/20001/base/memory/memory_pressure_monitor_linux.h#newcode17 base/memory/memory_pressure_monitor_linux.h:17: namespace nix { On 2015/07/24 13:25:46, chrisha wrote: > ...
5 years, 5 months ago (2015-07-24 19:03:10 UTC) #5
mario.endlessm
Hi. It looks like this work never landed, in which case I'd be curious to ...
4 years, 10 months ago (2016-01-28 16:07:45 UTC) #6
proberge
On 2016/01/28 16:07:45, mario.endlessm wrote: > Hi. It looks like this work never landed, in ...
4 years, 10 months ago (2016-01-28 17:45:12 UTC) #7
mario.endlessm
On 2016/01/28 17:45:12, proberge wrote: > [...] > Hi Mario, > > This ended up ...
4 years, 10 months ago (2016-02-03 15:23:30 UTC) #8
mario.endlessm
On 2016/02/03 15:23:30, mario.endlessm wrote: > On 2016/01/28 17:45:12, proberge wrote: > > [...] > ...
4 years, 10 months ago (2016-02-03 19:07:15 UTC) #9
proberge
On 2016/02/03 19:07:15, mario.endlessm wrote: > On 2016/02/03 15:23:30, mario.endlessm wrote: > > On 2016/01/28 ...
4 years, 10 months ago (2016-02-03 19:21:02 UTC) #10
mario.endlessm
4 years, 10 months ago (2016-02-03 19:24:19 UTC) #11
Message was sent while issue was closed.
On 2016/02/03 19:21:02, proberge wrote:
> [...]
> It seems like they're still in the process of refactoring the memory pressure
> code, as there's no outside reference to components/memory_pressure.

Thanks for confirming that I'm not mad after all :)

> You could send an e-mail to the OWNERS of that folder to check up on progress
> and/or offer to help:
>
https://code.google.com/p/chromium/codesearch#chromium/src/components/memory_...

Good point. I'll do that after dinner, thanks!

Powered by Google App Engine
This is Rietveld 408576698