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

Issue 1686943002: Oilpan: Decommit backing storage of CallbackStacks (Closed)

Created:
4 years, 10 months ago by haraken
Modified:
4 years, 10 months ago
Reviewers:
keishi, sof
CC:
chromium-reviews, oilpan-reviews, Mads Ager (chromium), blink-reviews, kinuko+watch, kouhei+heap_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Oilpan: Decommit backing storage of CallbackStacks CallbackStacks are used only while Oilpan's GC is doing marking & weak processing. However, currently each CallbackStack continues retaining one Block forever. This wastes memory a lot. Oilpan has 4 global CallbackStacks and 1 CallbackStack per thread. Each Block consumes 8192 * sizeof(Item) = 128 KB. This means that Oilpan wastes 128 KB * (4 + # of threads). When I start Chrome's new tab page, it creates 18 CallbackStacks, meaning that it wastes 2.3 MB of memory. This CL removes the waste by discarding system pages of the Block after finishing every GC phase. BUG= Committed: https://crrev.com/34393519671e62e5a66602736899b94ad33dd45a Cr-Commit-Position: refs/heads/master@{#374674} Committed: https://crrev.com/494e3b6b092a89e8987781e9fb4412f24c0f4bd8 Cr-Commit-Position: refs/heads/master@{#377575}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Total comments: 2

Patch Set 7 : #

Total comments: 6

Patch Set 8 : #

Patch Set 9 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+66 lines, -36 lines) Patch
M third_party/WebKit/Source/platform/heap/CallbackStack.h View 1 2 3 4 5 6 7 4 chunks +8 lines, -21 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/CallbackStack.cpp View 1 2 3 4 5 6 7 8 2 chunks +44 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/Heap.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/Heap.cpp View 1 2 3 4 5 6 7 4 chunks +10 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/ThreadState.cpp View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 68 (15 generated)
haraken
PTAL
4 years, 10 months ago (2016-02-10 08:33:21 UTC) #2
sof
what if this allocation fails when under memory pressure?
4 years, 10 months ago (2016-02-10 08:34:54 UTC) #4
haraken
On 2016/02/10 08:34:54, sof wrote: > what if this allocation fails when under memory pressure? ...
4 years, 10 months ago (2016-02-10 08:39:28 UTC) #5
sof
On 2016/02/10 08:39:28, haraken wrote: > On 2016/02/10 08:34:54, sof wrote: > > what if ...
4 years, 10 months ago (2016-02-10 08:47:48 UTC) #6
haraken
On 2016/02/10 08:47:48, sof wrote: > On 2016/02/10 08:39:28, haraken wrote: > > On 2016/02/10 ...
4 years, 10 months ago (2016-02-10 08:56:40 UTC) #7
esprehn
Why are the 5 stacks? Is there a design doc that explains this? I'm with ...
4 years, 10 months ago (2016-02-10 09:04:53 UTC) #8
haraken
On 2016/02/10 09:04:53, esprehn wrote: > Why are the 5 stacks? Is there a design ...
4 years, 10 months ago (2016-02-10 09:15:29 UTC) #9
sof
On 2016/02/10 08:56:40, haraken wrote: > On 2016/02/10 08:47:48, sof wrote: > > On 2016/02/10 ...
4 years, 10 months ago (2016-02-10 09:54:06 UTC) #10
haraken
On 2016/02/10 09:54:06, sof wrote: > On 2016/02/10 08:56:40, haraken wrote: > > On 2016/02/10 ...
4 years, 10 months ago (2016-02-10 11:55:50 UTC) #11
sof
On 2016/02/10 11:55:50, haraken wrote: > On 2016/02/10 09:54:06, sof wrote: > > On 2016/02/10 ...
4 years, 10 months ago (2016-02-10 12:04:11 UTC) #12
haraken
When I start Chrome, 36 CallbackStacks are created. When I navigate to twitter, (some of ...
4 years, 10 months ago (2016-02-10 12:08:06 UTC) #13
haraken
On 2016/02/10 12:04:11, sof wrote: > On 2016/02/10 11:55:50, haraken wrote: > > On 2016/02/10 ...
4 years, 10 months ago (2016-02-10 12:11:37 UTC) #14
haraken
On 2016/02/10 12:11:37, haraken wrote: > On 2016/02/10 12:04:11, sof wrote: > > On 2016/02/10 ...
4 years, 10 months ago (2016-02-10 12:14:29 UTC) #15
sof
On 2016/02/10 12:11:37, haraken wrote: > On 2016/02/10 12:04:11, sof wrote: > > On 2016/02/10 ...
4 years, 10 months ago (2016-02-10 12:40:09 UTC) #16
haraken
On 2016/02/10 12:40:09, sof wrote: > On 2016/02/10 12:11:37, haraken wrote: > > On 2016/02/10 ...
4 years, 10 months ago (2016-02-10 13:43:14 UTC) #17
sof
lgtm. could you sync&update the description as well? https://codereview.chromium.org/1686943002/diff/100001/third_party/WebKit/Source/platform/heap/CallbackStack.cpp File third_party/WebKit/Source/platform/heap/CallbackStack.cpp (right): https://codereview.chromium.org/1686943002/diff/100001/third_party/WebKit/Source/platform/heap/CallbackStack.cpp#newcode37 third_party/WebKit/Source/platform/heap/CallbackStack.cpp:37: WTF::discardSystemPages(m_buffer, ...
4 years, 10 months ago (2016-02-10 14:11:38 UTC) #20
haraken
https://codereview.chromium.org/1686943002/diff/100001/third_party/WebKit/Source/platform/heap/CallbackStack.cpp File third_party/WebKit/Source/platform/heap/CallbackStack.cpp (right): https://codereview.chromium.org/1686943002/diff/100001/third_party/WebKit/Source/platform/heap/CallbackStack.cpp#newcode37 third_party/WebKit/Source/platform/heap/CallbackStack.cpp:37: WTF::discardSystemPages(m_buffer, blockSize * sizeof(Item)); On 2016/02/10 14:11:38, sof wrote: ...
4 years, 10 months ago (2016-02-10 15:20:24 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1686943002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1686943002/120001
4 years, 10 months ago (2016-02-10 15:21:23 UTC) #25
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 10 months ago (2016-02-10 17:21:43 UTC) #27
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/34393519671e62e5a66602736899b94ad33dd45a Cr-Commit-Position: refs/heads/master@{#374674}
4 years, 10 months ago (2016-02-10 17:23:11 UTC) #29
haraken
Hmm, I begin to think that the original approach (i.e., destruct CallbackStacks every time) would ...
4 years, 10 months ago (2016-02-11 05:55:38 UTC) #30
sof
On 2016/02/11 05:55:38, haraken wrote: > Hmm, I begin to think that the original approach ...
4 years, 10 months ago (2016-02-11 06:05:55 UTC) #31
haraken
On 2016/02/11 06:05:55, sof wrote: > On 2016/02/11 05:55:38, haraken wrote: > > Hmm, I ...
4 years, 10 months ago (2016-02-11 06:17:37 UTC) #32
sof
On 2016/02/11 06:17:37, haraken wrote: > On 2016/02/11 06:05:55, sof wrote: > > On 2016/02/11 ...
4 years, 10 months ago (2016-02-11 06:28:26 UTC) #33
haraken
On 2016/02/11 06:28:26, sof wrote: > On 2016/02/11 06:17:37, haraken wrote: > > On 2016/02/11 ...
4 years, 10 months ago (2016-02-11 06:29:59 UTC) #34
haraken
A revert of this CL (patchset #7 id:120001) has been created in https://codereview.chromium.org/1689823003/ by haraken@chromium.org. ...
4 years, 10 months ago (2016-02-11 06:31:12 UTC) #35
sof
On 2016/02/11 06:29:59, haraken wrote: > On 2016/02/11 06:28:26, sof wrote: > > On 2016/02/11 ...
4 years, 10 months ago (2016-02-11 06:32:18 UTC) #36
haraken
On 2016/02/11 06:32:18, sof wrote: > On 2016/02/11 06:29:59, haraken wrote: > > On 2016/02/11 ...
4 years, 10 months ago (2016-02-11 07:40:52 UTC) #37
sof
On 2016/02/11 07:40:52, haraken wrote: > On 2016/02/11 06:32:18, sof wrote: > > On 2016/02/11 ...
4 years, 10 months ago (2016-02-11 07:53:34 UTC) #38
haraken
On 2016/02/11 07:53:34, sof wrote: > On 2016/02/11 07:40:52, haraken wrote: > > On 2016/02/11 ...
4 years, 10 months ago (2016-02-11 08:07:24 UTC) #39
sof
On 2016/02/11 08:07:24, haraken wrote: > On 2016/02/11 07:53:34, sof wrote: > > On 2016/02/11 ...
4 years, 10 months ago (2016-02-11 08:10:58 UTC) #40
haraken
On 2016/02/11 08:10:58, sof wrote: > On 2016/02/11 08:07:24, haraken wrote: > > On 2016/02/11 ...
4 years, 10 months ago (2016-02-11 08:16:12 UTC) #41
haraken
On 2016/02/11 08:16:12, haraken wrote: > On 2016/02/11 08:10:58, sof wrote: > > On 2016/02/11 ...
4 years, 10 months ago (2016-02-12 05:45:09 UTC) #42
sof
https://codereview.chromium.org/1686943002/diff/120001/third_party/WebKit/Source/platform/heap/Heap.cpp File third_party/WebKit/Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/1686943002/diff/120001/third_party/WebKit/Source/platform/heap/Heap.cpp#newcode360 third_party/WebKit/Source/platform/heap/Heap.cpp:360: s_markingStack->decommit(); An alternative scheme would be for Heap to ...
4 years, 10 months ago (2016-02-24 09:29:39 UTC) #43
haraken
I confirmed that this CL doesn't regress frame_times on Linux: http://haraken.info/a/results.html On 2016/02/24 09:29:39, sof ...
4 years, 10 months ago (2016-02-24 09:42:22 UTC) #44
sof
On 2016/02/24 09:42:22, haraken wrote: > I confirmed that this CL doesn't regress frame_times on ...
4 years, 10 months ago (2016-02-24 09:48:35 UTC) #45
sof
https://codereview.chromium.org/1686943002/diff/120001/third_party/WebKit/Source/platform/heap/CallbackStack.cpp File third_party/WebKit/Source/platform/heap/CallbackStack.cpp (right): https://codereview.chromium.org/1686943002/diff/120001/third_party/WebKit/Source/platform/heap/CallbackStack.cpp#newcode115 third_party/WebKit/Source/platform/heap/CallbackStack.cpp:115: m_first->decommit(); Isn't this call redundant/unwanted if the stack itself ...
4 years, 10 months ago (2016-02-24 09:50:05 UTC) #46
haraken
I'll implement the per-heap-reserved-stack-region if the number of system calls really matters, but I don't ...
4 years, 10 months ago (2016-02-24 10:06:20 UTC) #47
sof
https://codereview.chromium.org/1686943002/diff/120001/third_party/WebKit/Source/platform/heap/CallbackStack.cpp File third_party/WebKit/Source/platform/heap/CallbackStack.cpp (right): https://codereview.chromium.org/1686943002/diff/120001/third_party/WebKit/Source/platform/heap/CallbackStack.cpp#newcode115 third_party/WebKit/Source/platform/heap/CallbackStack.cpp:115: m_first->decommit(); On 2016/02/24 10:06:19, haraken wrote: > On 2016/02/24 ...
4 years, 10 months ago (2016-02-24 10:07:40 UTC) #49
sof
On 2016/02/24 10:06:20, haraken wrote: > I'll implement the per-heap-reserved-stack-region if the number of system ...
4 years, 10 months ago (2016-02-24 10:11:46 UTC) #50
haraken
https://codereview.chromium.org/1686943002/diff/120001/third_party/WebKit/Source/platform/heap/CallbackStack.cpp File third_party/WebKit/Source/platform/heap/CallbackStack.cpp (right): https://codereview.chromium.org/1686943002/diff/120001/third_party/WebKit/Source/platform/heap/CallbackStack.cpp#newcode115 third_party/WebKit/Source/platform/heap/CallbackStack.cpp:115: m_first->decommit(); On 2016/02/24 10:07:39, sof wrote: > On 2016/02/24 ...
4 years, 10 months ago (2016-02-24 10:21:44 UTC) #51
haraken
On 2016/02/24 10:11:46, sof wrote: > On 2016/02/24 10:06:20, haraken wrote: > > I'll implement ...
4 years, 10 months ago (2016-02-24 10:23:39 UTC) #52
sof
On 2016/02/24 10:23:39, haraken wrote: > On 2016/02/24 10:11:46, sof wrote: > > On 2016/02/24 ...
4 years, 10 months ago (2016-02-24 10:25:57 UTC) #53
sof
https://codereview.chromium.org/1686943002/diff/120001/third_party/WebKit/Source/platform/heap/CallbackStack.cpp File third_party/WebKit/Source/platform/heap/CallbackStack.cpp (right): https://codereview.chromium.org/1686943002/diff/120001/third_party/WebKit/Source/platform/heap/CallbackStack.cpp#newcode115 third_party/WebKit/Source/platform/heap/CallbackStack.cpp:115: m_first->decommit(); On 2016/02/24 10:21:44, haraken wrote: > On 2016/02/24 ...
4 years, 10 months ago (2016-02-24 10:32:23 UTC) #54
haraken
On 2016/02/24 10:25:57, sof wrote: > On 2016/02/24 10:23:39, haraken wrote: > > On 2016/02/24 ...
4 years, 10 months ago (2016-02-24 10:33:01 UTC) #55
haraken
On 2016/02/24 10:32:23, sof wrote: > https://codereview.chromium.org/1686943002/diff/120001/third_party/WebKit/Source/platform/heap/CallbackStack.cpp > File third_party/WebKit/Source/platform/heap/CallbackStack.cpp (right): > > https://codereview.chromium.org/1686943002/diff/120001/third_party/WebKit/Source/platform/heap/CallbackStack.cpp#newcode115 > ...
4 years, 10 months ago (2016-02-24 10:34:26 UTC) #56
sof
lgtm. (tuning sizes separately makes more sense.)
4 years, 10 months ago (2016-02-24 10:42:43 UTC) #57
haraken
On 2016/02/24 10:42:43, sof wrote: > lgtm. > > (tuning sizes separately makes more sense.) ...
4 years, 10 months ago (2016-02-24 11:06:44 UTC) #58
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1686943002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1686943002/160001
4 years, 10 months ago (2016-02-25 10:06:29 UTC) #60
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/186780)
4 years, 10 months ago (2016-02-25 12:24:23 UTC) #62
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1686943002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1686943002/160001
4 years, 10 months ago (2016-02-25 12:30:37 UTC) #64
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 10 months ago (2016-02-25 14:49:06 UTC) #66
commit-bot: I haz the power
4 years, 10 months ago (2016-02-25 14:50:04 UTC) #68
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/494e3b6b092a89e8987781e9fb4412f24c0f4bd8
Cr-Commit-Position: refs/heads/master@{#377575}

Powered by Google App Engine
This is Rietveld 408576698