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

Issue 1427163003: [Discardable Shared Memory] Adding Windows support. (Closed)

Created:
5 years, 1 month ago by penny
Modified:
5 years, 1 month ago
CC:
chromium-reviews, gavinp+memory_chromium.org, vmpstr+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Discardable Shared Memory] Adding Windows support. 1) Purge(): Now doing VirtualFree MEM_DECOMMIT back to XP during a purge. This releases the physical storage, either in memory or in the paging file on disk. Pages remain RESERVED. NOTE: this is the best that can be done immediately from the browser, until the child/renderer notices the purge and releases its own handles. 2) Lock/Unlock() pinning: For >= Win8, we have access to MEM_RESET_UNDO support. On Unlock(), we now MEM_RESET. On Lock(), we MEM_RESET_UNDO. This mimics the existing Ashmem support on Android. (See bug ticket for why OfferVirtualMemory/ReclaimVirtualMemory is not being used.) BUG=180334 R=reveman@chromium.org,jschuh@chromium.org Committed: https://crrev.com/498c30ec10c16ba90cd425836c5a92ac0d685c36 Cr-Commit-Position: refs/heads/master@{#358466}

Patch Set 1 #

Total comments: 8

Patch Set 2 : Review fixes part 1. #

Total comments: 2

Patch Set 3 : Review fixes part 2. #

Total comments: 16

Patch Set 4 : Review fixes part 3. (Static Windows version back (but cleaner), and more comments.) #

Total comments: 2

Patch Set 5 : Review fixes part 4. (One CL to rule them all?) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -0 lines) Patch
M base/memory/discardable_shared_memory.cc View 1 2 3 4 7 chunks +40 lines, -0 lines 0 comments Download

Messages

Total messages: 27 (7 generated)
reveman
cool! maybe you already did but if not please run "cl format" on this patch ...
5 years, 1 month ago (2015-11-03 00:23:57 UTC) #1
penny
New upload incoming. Thanks for your review David, I appreciate it. https://codereview.chromium.org/1427163003/diff/1/base/memory/discardable_shared_memory.cc File base/memory/discardable_shared_memory.cc (right): ...
5 years, 1 month ago (2015-11-03 01:14:47 UTC) #2
reveman
lgtm with nit but please have someone more familiar with the VirtualAlloc windows API review ...
5 years, 1 month ago (2015-11-03 01:42:31 UTC) #3
penny
https://codereview.chromium.org/1427163003/diff/20001/base/memory/discardable_shared_memory.cc File base/memory/discardable_shared_memory.cc (right): https://codereview.chromium.org/1427163003/diff/20001/base/memory/discardable_shared_memory.cc#newcode369 base/memory/discardable_shared_memory.cc:369: // child/renderer notices the purge and releases its own ...
5 years, 1 month ago (2015-11-03 02:17:08 UTC) #4
jschuh
https://codereview.chromium.org/1427163003/diff/40001/base/memory/discardable_shared_memory.cc File base/memory/discardable_shared_memory.cc (right): https://codereview.chromium.org/1427163003/diff/40001/base/memory/discardable_shared_memory.cc#newcode231 base/memory/discardable_shared_memory.cc:231: if (base::win::GetVersion() >= base::win::VERSION_WIN8) { Save the version off ...
5 years, 1 month ago (2015-11-03 05:11:24 UTC) #5
penny
Thanks for the Windows API usage checks Justin! See notes. https://codereview.chromium.org/1427163003/diff/40001/base/memory/discardable_shared_memory.cc File base/memory/discardable_shared_memory.cc (right): https://codereview.chromium.org/1427163003/diff/40001/base/memory/discardable_shared_memory.cc#newcode231 ...
5 years, 1 month ago (2015-11-03 18:25:44 UTC) #6
brucedawson
Memory is so darned messy. I wrote a couple of short novels rambling about the ...
5 years, 1 month ago (2015-11-04 21:51:27 UTC) #9
jschuh
Okay, thanks for all the context, sorry for the confusion, and lgtm. My only nits ...
5 years, 1 month ago (2015-11-04 21:52:43 UTC) #10
penny
Thanks Bruce and Justin for input. David, let me know if you're happy with my ...
5 years, 1 month ago (2015-11-05 18:45:20 UTC) #11
reveman
Sorry, not lgtm. Do we have data showing that this version value needs to be ...
5 years, 1 month ago (2015-11-05 19:13:47 UTC) #12
penny
https://codereview.chromium.org/1427163003/diff/60001/base/memory/discardable_shared_memory.cc File base/memory/discardable_shared_memory.cc (right): https://codereview.chromium.org/1427163003/diff/60001/base/memory/discardable_shared_memory.cc#newcode230 base/memory/discardable_shared_memory.cc:230: ((osVersion = base::win::GetVersion()) >= base::win::VERSION_WIN8))) { On 2015/11/05 19:13:47, ...
5 years, 1 month ago (2015-11-05 19:51:29 UTC) #13
penny
On 2015/11/05 19:51:29, penny wrote: > https://codereview.chromium.org/1427163003/diff/60001/base/memory/discardable_shared_memory.cc > File base/memory/discardable_shared_memory.cc (right): > > https://codereview.chromium.org/1427163003/diff/60001/base/memory/discardable_shared_memory.cc#newcode230 > ...
5 years, 1 month ago (2015-11-06 18:20:20 UTC) #14
reveman
lgtm
5 years, 1 month ago (2015-11-06 18:36:03 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1427163003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1427163003/80001
5 years, 1 month ago (2015-11-06 19:03:36 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/116410)
5 years, 1 month ago (2015-11-06 20:41:23 UTC) #20
Lei Zhang
stampy lgtm
5 years, 1 month ago (2015-11-06 21:44:49 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1427163003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1427163003/80001
5 years, 1 month ago (2015-11-06 21:50:24 UTC) #24
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years, 1 month ago (2015-11-07 00:23:45 UTC) #25
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/498c30ec10c16ba90cd425836c5a92ac0d685c36 Cr-Commit-Position: refs/heads/master@{#358466}
5 years, 1 month ago (2015-11-07 00:24:49 UTC) #26
nednguyen
5 years ago (2015-11-25 22:13:45 UTC) #27
Message was sent while issue was closed.
A revert of this CL (patchset #5 id:80001) has been created in
https://codereview.chromium.org/1473733005/ by nednguyen@google.com.

The reason for reverting is: Speculative revert: this may cause regression to
smoothness.tough_canvas_cases

BUG=555225.

Powered by Google App Engine
This is Rietveld 408576698